home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / zsh-3.0-p / zsh-3 / zsh-3.0-pre3 / configure < prev    next >
Text File  |  1996-07-10  |  87KB  |  3,175 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.10 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-zsh-debug         use it if you want to debug zsh"
  16. ac_help="$ac_help
  17.   --enable-zsh-mem           use zsh memory allocation routines"
  18. ac_help="$ac_help
  19.   --enable-zsh-mem-debug     debug zsh memory allocation routines"
  20. ac_help="$ac_help
  21.   --enable-zsh-mem-warning   print warnings when error in memory allocation"
  22. ac_help="$ac_help
  23.   --enable-zsh-secure-free   turn on error checking for free()"
  24. ac_help="$ac_help
  25.   --enable-zsh-hash-debug    turn on debugging of internal hash tables"
  26. ac_help="$ac_help
  27.   --enable-etcdir=directory  default directory for global zsh scripts"
  28. ac_help="$ac_help
  29.   --enable-zshenv=pathname   the full pathname of the global zshenv script"
  30. ac_help="$ac_help
  31.   --enable-zshrc=pathname    the full pathname of the global zshrc script"
  32. ac_help="$ac_help
  33.   --enable-zprofile=pathname the full pathname of the global zprofile script"
  34. ac_help="$ac_help
  35.   --enable-zlogin=pathname   the full pathname of the global zlogin script"
  36. ac_help="$ac_help
  37.   --enable-zlogout=pathname  the full pathname of the global zlogout script"
  38.  
  39. # Initialize some variables set by options.
  40. # The variables have the same names as the options, with
  41. # dashes changed to underlines.
  42. build=NONE
  43. cache_file=./config.cache
  44. exec_prefix=NONE
  45. host=NONE
  46. no_create=
  47. nonopt=NONE
  48. no_recursion=
  49. prefix=NONE
  50. program_prefix=NONE
  51. program_suffix=NONE
  52. program_transform_name=s,x,x,
  53. silent=
  54. site=
  55. srcdir=
  56. target=NONE
  57. verbose=
  58. x_includes=NONE
  59. x_libraries=NONE
  60. bindir='${exec_prefix}/bin'
  61. sbindir='${exec_prefix}/sbin'
  62. libexecdir='${exec_prefix}/libexec'
  63. datadir='${prefix}/share'
  64. sysconfdir='${prefix}/etc'
  65. sharedstatedir='${prefix}/com'
  66. localstatedir='${prefix}/var'
  67. libdir='${exec_prefix}/lib'
  68. includedir='${prefix}/include'
  69. oldincludedir='/usr/include'
  70. infodir='${prefix}/info'
  71. mandir='${prefix}/man'
  72.  
  73. # Initialize some other variables.
  74. subdirs=
  75. MFLAGS= MAKEFLAGS=
  76.  
  77. ac_prev=
  78. for ac_option
  79. do
  80.  
  81.   # If the previous option needs an argument, assign it.
  82.   if test -n "$ac_prev"; then
  83.     eval "$ac_prev=\$ac_option"
  84.     ac_prev=
  85.     continue
  86.   fi
  87.  
  88.   case "$ac_option" in
  89.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  90.   *) ac_optarg= ;;
  91.   esac
  92.  
  93.   # Accept the important Cygnus configure options, so we can diagnose typos.
  94.  
  95.   case "$ac_option" in
  96.  
  97.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  98.     ac_prev=bindir ;;
  99.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  100.     bindir="$ac_optarg" ;;
  101.  
  102.   -build | --build | --buil | --bui | --bu)
  103.     ac_prev=build ;;
  104.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  105.     build="$ac_optarg" ;;
  106.  
  107.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  108.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  109.     ac_prev=cache_file ;;
  110.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  111.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  112.     cache_file="$ac_optarg" ;;
  113.  
  114.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  115.     ac_prev=datadir ;;
  116.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  117.   | --da=*)
  118.     datadir="$ac_optarg" ;;
  119.  
  120.   -disable-* | --disable-*)
  121.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  122.     # Reject names that are not valid shell variable names.
  123.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  124.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  125.     fi
  126.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  127.     eval "enable_${ac_feature}=no" ;;
  128.  
  129.   -enable-* | --enable-*)
  130.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  131.     # Reject names that are not valid shell variable names.
  132.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  133.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  134.     fi
  135.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  136.     case "$ac_option" in
  137.       *=*) ;;
  138.       *) ac_optarg=yes ;;
  139.     esac
  140.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  141.  
  142.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  143.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  144.   | --exec | --exe | --ex)
  145.     ac_prev=exec_prefix ;;
  146.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  147.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  148.   | --exec=* | --exe=* | --ex=*)
  149.     exec_prefix="$ac_optarg" ;;
  150.  
  151.   -gas | --gas | --ga | --g)
  152.     # Obsolete; use --with-gas.
  153.     with_gas=yes ;;
  154.  
  155.   -help | --help | --hel | --he)
  156.     # Omit some internal or obsolete options to make the list less imposing.
  157.     # This message is too long to be a string in the A/UX 3.1 sh.
  158.     cat << EOF
  159. Usage: configure [options] [host]
  160. Options: [defaults in brackets after descriptions]
  161. Configuration:
  162.   --cache-file=FILE       cache test results in FILE
  163.   --help                  print this message
  164.   --no-create             do not create output files
  165.   --quiet, --silent       do not print \`checking...' messages
  166.   --version               print the version of autoconf that created configure
  167. Directory and file names:
  168.   --prefix=PREFIX         install architecture-independent files in PREFIX
  169.                           [$ac_default_prefix]
  170.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  171.                           [same as prefix]
  172.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  173.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  174.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  175.   --datadir=DIR           read-only architecture-independent data in DIR
  176.                           [PREFIX/share]
  177.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  178.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  179.                           [PREFIX/com]
  180.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  181.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  182.   --includedir=DIR        C header files in DIR [PREFIX/include]
  183.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  184.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  185.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  186.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  187.   --program-prefix=PREFIX prepend PREFIX to installed program names
  188.   --program-suffix=SUFFIX append SUFFIX to installed program names
  189.   --program-transform-name=PROGRAM
  190.                           run sed PROGRAM on installed program names
  191. EOF
  192.     cat << EOF
  193. Host type:
  194.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  195.   --host=HOST             configure for HOST [guessed]
  196.   --target=TARGET         configure for TARGET [TARGET=HOST]
  197. Features and packages:
  198.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  199.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  200.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  201.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  202.   --x-includes=DIR        X include files are in DIR
  203.   --x-libraries=DIR       X library files are in DIR
  204. EOF
  205.     if test -n "$ac_help"; then
  206.       echo "--enable and --with options recognized:$ac_help"
  207.     fi
  208.     exit 0 ;;
  209.  
  210.   -host | --host | --hos | --ho)
  211.     ac_prev=host ;;
  212.   -host=* | --host=* | --hos=* | --ho=*)
  213.     host="$ac_optarg" ;;
  214.  
  215.   -includedir | --includedir | --includedi | --included | --include \
  216.   | --includ | --inclu | --incl | --inc)
  217.     ac_prev=includedir ;;
  218.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  219.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  220.     includedir="$ac_optarg" ;;
  221.  
  222.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  223.     ac_prev=infodir ;;
  224.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  225.     infodir="$ac_optarg" ;;
  226.  
  227.   -libdir | --libdir | --libdi | --libd)
  228.     ac_prev=libdir ;;
  229.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  230.     libdir="$ac_optarg" ;;
  231.  
  232.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  233.   | --libexe | --libex | --libe)
  234.     ac_prev=libexecdir ;;
  235.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  236.   | --libexe=* | --libex=* | --libe=*)
  237.     libexecdir="$ac_optarg" ;;
  238.  
  239.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  240.   | --localstate | --localstat | --localsta | --localst \
  241.   | --locals | --local | --loca | --loc | --lo)
  242.     ac_prev=localstatedir ;;
  243.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  244.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  245.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  246.     localstatedir="$ac_optarg" ;;
  247.  
  248.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  249.     ac_prev=mandir ;;
  250.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  251.     mandir="$ac_optarg" ;;
  252.  
  253.   -nfp | --nfp | --nf)
  254.     # Obsolete; use --without-fp.
  255.     with_fp=no ;;
  256.  
  257.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  258.   | --no-cr | --no-c)
  259.     no_create=yes ;;
  260.  
  261.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  262.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  263.     no_recursion=yes ;;
  264.  
  265.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  266.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  267.   | --oldin | --oldi | --old | --ol | --o)
  268.     ac_prev=oldincludedir ;;
  269.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  270.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  271.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  272.     oldincludedir="$ac_optarg" ;;
  273.  
  274.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  275.     ac_prev=prefix ;;
  276.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  277.     prefix="$ac_optarg" ;;
  278.  
  279.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  280.   | --program-pre | --program-pr | --program-p)
  281.     ac_prev=program_prefix ;;
  282.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  283.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  284.     program_prefix="$ac_optarg" ;;
  285.  
  286.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  287.   | --program-suf | --program-su | --program-s)
  288.     ac_prev=program_suffix ;;
  289.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  290.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  291.     program_suffix="$ac_optarg" ;;
  292.  
  293.   -program-transform-name | --program-transform-name \
  294.   | --program-transform-nam | --program-transform-na \
  295.   | --program-transform-n | --program-transform- \
  296.   | --program-transform | --program-transfor \
  297.   | --program-transfo | --program-transf \
  298.   | --program-trans | --program-tran \
  299.   | --progr-tra | --program-tr | --program-t)
  300.     ac_prev=program_transform_name ;;
  301.   -program-transform-name=* | --program-transform-name=* \
  302.   | --program-transform-nam=* | --program-transform-na=* \
  303.   | --program-transform-n=* | --program-transform-=* \
  304.   | --program-transform=* | --program-transfor=* \
  305.   | --program-transfo=* | --program-transf=* \
  306.   | --program-trans=* | --program-tran=* \
  307.   | --progr-tra=* | --program-tr=* | --program-t=*)
  308.     program_transform_name="$ac_optarg" ;;
  309.  
  310.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  311.   | -silent | --silent | --silen | --sile | --sil)
  312.     silent=yes ;;
  313.  
  314.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  315.     ac_prev=sbindir ;;
  316.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  317.   | --sbi=* | --sb=*)
  318.     sbindir="$ac_optarg" ;;
  319.  
  320.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  321.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  322.   | --sharedst | --shareds | --shared | --share | --shar \
  323.   | --sha | --sh)
  324.     ac_prev=sharedstatedir ;;
  325.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  326.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  327.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  328.   | --sha=* | --sh=*)
  329.     sharedstatedir="$ac_optarg" ;;
  330.  
  331.   -site | --site | --sit)
  332.     ac_prev=site ;;
  333.   -site=* | --site=* | --sit=*)
  334.     site="$ac_optarg" ;;
  335.  
  336.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  337.     ac_prev=srcdir ;;
  338.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  339.     srcdir="$ac_optarg" ;;
  340.  
  341.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  342.   | --syscon | --sysco | --sysc | --sys | --sy)
  343.     ac_prev=sysconfdir ;;
  344.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  345.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  346.     sysconfdir="$ac_optarg" ;;
  347.  
  348.   -target | --target | --targe | --targ | --tar | --ta | --t)
  349.     ac_prev=target ;;
  350.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  351.     target="$ac_optarg" ;;
  352.  
  353.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  354.     verbose=yes ;;
  355.  
  356.   -version | --version | --versio | --versi | --vers)
  357.     echo "configure generated by autoconf version 2.10"
  358.     exit 0 ;;
  359.  
  360.   -with-* | --with-*)
  361.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  362.     # Reject names that are not valid shell variable names.
  363.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  364.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  365.     fi
  366.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  367.     case "$ac_option" in
  368.       *=*) ;;
  369.       *) ac_optarg=yes ;;
  370.     esac
  371.     eval "with_${ac_package}='$ac_optarg'" ;;
  372.  
  373.   -without-* | --without-*)
  374.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  375.     # Reject names that are not valid shell variable names.
  376.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  377.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  378.     fi
  379.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  380.     eval "with_${ac_package}=no" ;;
  381.  
  382.   --x)
  383.     # Obsolete; use --with-x.
  384.     with_x=yes ;;
  385.  
  386.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  387.   | --x-incl | --x-inc | --x-in | --x-i)
  388.     ac_prev=x_includes ;;
  389.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  390.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  391.     x_includes="$ac_optarg" ;;
  392.  
  393.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  394.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  395.     ac_prev=x_libraries ;;
  396.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  397.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  398.     x_libraries="$ac_optarg" ;;
  399.  
  400.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  401.     ;;
  402.  
  403.   *)
  404.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  405.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  406.     fi
  407.     if test "x$nonopt" != xNONE; then
  408.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  409.     fi
  410.     nonopt="$ac_option"
  411.     ;;
  412.  
  413.   esac
  414. done
  415.  
  416. if test -n "$ac_prev"; then
  417.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  418. fi
  419.  
  420. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  421.  
  422. # File descriptor usage:
  423. # 0 standard input
  424. # 1 file creation
  425. # 2 errors and warnings
  426. # 3 some systems may open it to /dev/tty
  427. # 4 used on the Kubota Titan
  428. # 6 checking for... messages and results
  429. # 5 compiler messages saved in config.log
  430. if test "$silent" = yes; then
  431.   exec 6>/dev/null
  432. else
  433.   exec 6>&1
  434. fi
  435. exec 5>./config.log
  436.  
  437. echo "\
  438. This file contains any messages produced by compilers while
  439. running configure, to aid debugging if configure makes a mistake.
  440. " 1>&5
  441.  
  442. # Strip out --no-create and --no-recursion so they do not pile up.
  443. # Also quote any args containing shell metacharacters.
  444. ac_configure_args=
  445. for ac_arg
  446. do
  447.   case "$ac_arg" in
  448.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  449.   | --no-cr | --no-c) ;;
  450.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  451.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  452.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  453.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  454.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  455.   esac
  456. done
  457.  
  458. # NLS nuisances.
  459. # Only set LANG and LC_ALL to C if already set.
  460. # These must not be set unconditionally because not all systems understand
  461. # e.g. LANG=C (notably SCO).
  462. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  463. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  464.  
  465. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  466. rm -rf conftest* confdefs.h
  467. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  468. echo > confdefs.h
  469.  
  470. # A filename unique to this package, relative to the directory that
  471. # configure is in, which we can look for to find out if srcdir is correct.
  472. ac_unique_file=Src/zsh.h
  473.  
  474. # Find the source files, if location was not specified.
  475. if test -z "$srcdir"; then
  476.   ac_srcdir_defaulted=yes
  477.   # Try the directory containing this script, then its parent.
  478.   ac_prog=$0
  479.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  480.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  481.   srcdir=$ac_confdir
  482.   if test ! -r $srcdir/$ac_unique_file; then
  483.     srcdir=..
  484.   fi
  485. else
  486.   ac_srcdir_defaulted=no
  487. fi
  488. if test ! -r $srcdir/$ac_unique_file; then
  489.   if test "$ac_srcdir_defaulted" = yes; then
  490.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  491.   else
  492.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  493.   fi
  494. fi
  495. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  496.  
  497. # Prefer explicitly selected file to automatically selected ones.
  498. if test -z "$CONFIG_SITE"; then
  499.   if test "x$prefix" != xNONE; then
  500.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  501.   else
  502.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  503.   fi
  504. fi
  505. for ac_site_file in $CONFIG_SITE; do
  506.   if test -r "$ac_site_file"; then
  507.     echo "loading site script $ac_site_file"
  508.     . "$ac_site_file"
  509.   fi
  510. done
  511.  
  512. if test -r "$cache_file"; then
  513.   echo "loading cache $cache_file"
  514.   . $cache_file
  515. else
  516.   echo "creating cache $cache_file"
  517.   > $cache_file
  518. fi
  519.  
  520. ac_ext=c
  521. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  522. ac_cpp='$CPP $CPPFLAGS'
  523. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  524. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  525.  
  526. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  527.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  528.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  529.     ac_n= ac_c='
  530. ' ac_t='    '
  531.   else
  532.     ac_n=-n ac_c= ac_t=
  533.   fi
  534. else
  535.   ac_n= ac_c='\c' ac_t=
  536. fi
  537.  
  538.  
  539.  
  540.  
  541. VERSION=`sed -e 's/^.*"\(.*\)"$/\1/' ${srcdir}/Src/version.h`
  542. echo "configuring for zsh $VERSION"
  543.  
  544. ac_aux_dir=
  545. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  546.   if test -f $ac_dir/install-sh; then
  547.     ac_aux_dir=$ac_dir
  548.     ac_install_sh="$ac_aux_dir/install-sh -c"
  549.     break
  550.   elif test -f $ac_dir/install.sh; then
  551.     ac_aux_dir=$ac_dir
  552.     ac_install_sh="$ac_aux_dir/install.sh -c"
  553.     break
  554.   fi
  555. done
  556. if test -z "$ac_aux_dir"; then
  557.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  558. fi
  559. ac_config_guess=$ac_aux_dir/config.guess
  560. ac_config_sub=$ac_aux_dir/config.sub
  561. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  562.  
  563.  
  564. # Make sure we can run config.sub.
  565. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  566. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  567. fi
  568.  
  569. echo $ac_n "checking host system type""... $ac_c" 1>&6
  570.  
  571. host_alias=$host
  572. case "$host_alias" in
  573. NONE)
  574.   case $nonopt in
  575.   NONE)
  576.     if host_alias=`$ac_config_guess`; then :
  577.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  578.     fi ;;
  579.   *) host_alias=$nonopt ;;
  580.   esac ;;
  581. esac
  582.  
  583. host=`$ac_config_sub $host_alias`
  584. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  585. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  586. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  587. echo "$ac_t""$host" 1>&6
  588.  
  589. cat >> confdefs.h <<EOF
  590. #define OSTYPE "$host_os"
  591. EOF
  592.  
  593. cat >> confdefs.h <<EOF
  594. #define MACHTYPE "$host_cpu"
  595. EOF
  596.  
  597. cat >> confdefs.h <<EOF
  598. #define VENDOR "$host_vendor"
  599. EOF
  600.  
  601.  
  602. # Check whether --enable-zsh-debug or --disable-zsh-debug was given.
  603. if test "${enable_zsh_debug+set}" = set; then
  604.   enableval="$enable_zsh_debug"
  605.   :
  606. fi
  607.  
  608.  
  609. # Check whether --enable-zsh-mem or --disable-zsh-mem was given.
  610. if test "${enable_zsh_mem+set}" = set; then
  611.   enableval="$enable_zsh_mem"
  612.   if test x$enableval = xyes; then
  613.   cat >> confdefs.h <<\EOF
  614. #define ZSH_MEM 1
  615. EOF
  616.  
  617. fi
  618. fi
  619.  
  620.  
  621. # Check whether --enable-zsh-mem-debug or --disable-zsh-mem-debug was given.
  622. if test "${enable_zsh_mem_debug+set}" = set; then
  623.   enableval="$enable_zsh_mem_debug"
  624.   if test x$enableval = xyes; then
  625.   cat >> confdefs.h <<\EOF
  626. #define ZSH_MEM_DEBUG 1
  627. EOF
  628.  
  629. fi
  630. fi
  631.  
  632.  
  633. # Check whether --enable-zsh-mem-warning or --disable-zsh-mem-warning was given.
  634. if test "${enable_zsh_mem_warning+set}" = set; then
  635.   enableval="$enable_zsh_mem_warning"
  636.   if test x$enableval = xyes; then
  637.   cat >> confdefs.h <<\EOF
  638. #define ZSH_MEM_WARNING 1
  639. EOF
  640.  
  641. fi
  642. fi
  643.  
  644.  
  645. # Check whether --enable-zsh-secure-free or --disable-zsh-secure-free was given.
  646. if test "${enable_zsh_secure_free+set}" = set; then
  647.   enableval="$enable_zsh_secure_free"
  648.   if test x$enableval = xyes; then
  649.   cat >> confdefs.h <<\EOF
  650. #define ZSH_SECURE_FREE 1
  651. EOF
  652.  
  653. fi
  654. fi
  655.  
  656.  
  657. # Check whether --enable-zsh-hash-debug or --disable-zsh-hash-debug was given.
  658. if test "${enable_zsh_hash_debug+set}" = set; then
  659.   enableval="$enable_zsh_hash_debug"
  660.   if test x$enableval = xyes; then
  661.   cat >> confdefs.h <<\EOF
  662. #define ZSH_HASH_DEBUG 1
  663. EOF
  664.  
  665. fi
  666. fi
  667.  
  668.  
  669. # Check whether --enable-etcdir or --disable-etcdir was given.
  670. if test "${enable_etcdir+set}" = set; then
  671.   enableval="$enable_etcdir"
  672.   etcdir="$enableval"
  673. else
  674.   etcdir=/etc
  675. fi
  676.  
  677.  
  678. # Check whether --enable-zshenv or --disable-zshenv was given.
  679. if test "${enable_zshenv+set}" = set; then
  680.   enableval="$enable_zshenv"
  681.   zshenv="$enableval"
  682. else
  683.   if test "x$etcdir" = xno; then
  684.   zshenv=no
  685. else
  686.   zshenv="$etcdir/zshenv"
  687. fi
  688. fi
  689.  
  690. if test "x$zshenv" != xno; then
  691.   cat >> confdefs.h <<EOF
  692. #define GLOBAL_ZSHENV "$zshenv"
  693. EOF
  694.  
  695. fi
  696.  
  697. # Check whether --enable-zshrc or --disable-zshrc was given.
  698. if test "${enable_zshrc+set}" = set; then
  699.   enableval="$enable_zshrc"
  700.   zshrc="$enableval"
  701. else
  702.   if test "x$etcdir" = xno; then
  703.   zshrc=no
  704. else
  705.   zshrc="$etcdir/zshrc"
  706. fi
  707. fi
  708.  
  709. if test "x$zshrc" != xno; then
  710.   cat >> confdefs.h <<EOF
  711. #define GLOBAL_ZSHRC "$zshrc"
  712. EOF
  713.  
  714. fi
  715.  
  716. # Check whether --enable-zprofile or --disable-zprofile was given.
  717. if test "${enable_zprofile+set}" = set; then
  718.   enableval="$enable_zprofile"
  719.   zprofile="$enableval"
  720. else
  721.   if test "x$etcdir" = xno; then
  722.   zprofile=no
  723. else
  724.   zprofile="$etcdir/zprofile"
  725. fi
  726. fi
  727.  
  728. if test "x$zprofile" != xno; then
  729.   cat >> confdefs.h <<EOF
  730. #define GLOBAL_ZPROFILE "$zprofile"
  731. EOF
  732.  
  733. fi
  734.  
  735. # Check whether --enable-zlogin or --disable-zlogin was given.
  736. if test "${enable_zlogin+set}" = set; then
  737.   enableval="$enable_zlogin"
  738.   zlogin="$enableval"
  739. else
  740.   if test "x$etcdir" = xno; then
  741.   zlogin=no
  742. else
  743.   zlogin="$etcdir/zlogin"
  744. fi
  745. fi
  746.  
  747. if test "x$zlogin" != xno; then
  748.   cat >> confdefs.h <<EOF
  749. #define GLOBAL_ZLOGIN "$zlogin"
  750. EOF
  751.  
  752. fi
  753.  
  754. # Check whether --enable-zlogout or --disable-zlogout was given.
  755. if test "${enable_zlogout+set}" = set; then
  756.   enableval="$enable_zlogout"
  757.   zlogout="$enableval"
  758. else
  759.   if test "x$etcdir" = xno; then
  760.   zlogout=no
  761. else
  762.   zlogout="$etcdir/zlogout"
  763. fi
  764. fi
  765.  
  766. if test "x$zlogout" != xno; then
  767.   cat >> confdefs.h <<EOF
  768. #define GLOBAL_ZLOGOUT "$zlogout"
  769. EOF
  770.  
  771. fi
  772.  
  773.  
  774. test -z "$CFLAGS"  && CFLAGS= auto_cflags=1
  775. if test "${enable_zsh_debug}" = yes; then
  776.   test -z "$LDFLAGS" && LDFLAGS=-g
  777. fi
  778.  
  779. # Extract the first word of "gcc", so it can be a program name with args.
  780. set dummy gcc; ac_word=$2
  781. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  782. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  783.   echo $ac_n "(cached) $ac_c" 1>&6
  784. else
  785.   if test -n "$CC"; then
  786.   ac_cv_prog_CC="$CC" # Let the user override the test.
  787. else
  788.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  789.   for ac_dir in $PATH; do
  790.     test -z "$ac_dir" && ac_dir=.
  791.     if test -f $ac_dir/$ac_word; then
  792.       ac_cv_prog_CC="gcc"
  793.       break
  794.     fi
  795.   done
  796.   IFS="$ac_save_ifs"
  797. fi
  798. fi
  799. CC="$ac_cv_prog_CC"
  800. if test -n "$CC"; then
  801.   echo "$ac_t""$CC" 1>&6
  802. else
  803.   echo "$ac_t""no" 1>&6
  804. fi
  805.  
  806. if test -z "$CC"; then
  807.   # Extract the first word of "cc", so it can be a program name with args.
  808. set dummy cc; ac_word=$2
  809. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  810. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  811.   echo $ac_n "(cached) $ac_c" 1>&6
  812. else
  813.   if test -n "$CC"; then
  814.   ac_cv_prog_CC="$CC" # Let the user override the test.
  815. else
  816.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  817.   ac_prog_rejected=no
  818.   for ac_dir in $PATH; do
  819.     test -z "$ac_dir" && ac_dir=.
  820.     if test -f $ac_dir/$ac_word; then
  821.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  822.         ac_prog_rejected=yes
  823.     continue
  824.       fi
  825.       ac_cv_prog_CC="cc"
  826.       break
  827.     fi
  828.   done
  829.   IFS="$ac_save_ifs"
  830. if test $ac_prog_rejected = yes; then
  831.   # We found a bogon in the path, so make sure we never use it.
  832.   set dummy $ac_cv_prog_CC
  833.   shift
  834.   if test $# -gt 0; then
  835.     # We chose a different compiler from the bogus one.
  836.     # However, it has the same basename, so the bogon will be chosen
  837.     # first if we set CC to just the basename; use the full file name.
  838.     shift
  839.     set dummy "$ac_dir/$ac_word" "$@"
  840.     shift
  841.     ac_cv_prog_CC="$@"
  842.   fi
  843. fi
  844. fi
  845. fi
  846. CC="$ac_cv_prog_CC"
  847. if test -n "$CC"; then
  848.   echo "$ac_t""$CC" 1>&6
  849. else
  850.   echo "$ac_t""no" 1>&6
  851. fi
  852.  
  853.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  854. fi
  855.  
  856. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  857. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  858.   echo $ac_n "(cached) $ac_c" 1>&6
  859. else
  860.   cat > conftest.c <<EOF
  861. #ifdef __GNUC__
  862.   yes;
  863. #endif
  864. EOF
  865. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  866.   ac_cv_prog_gcc=yes
  867. else
  868.   ac_cv_prog_gcc=no
  869. fi
  870. fi
  871.  
  872. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  873. if test $ac_cv_prog_gcc = yes; then
  874.   GCC=yes
  875.   if test "${CFLAGS+set}" != set; then
  876.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  877. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  878.   echo $ac_n "(cached) $ac_c" 1>&6
  879. else
  880.   echo 'void f(){}' > conftest.c
  881. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  882.   ac_cv_prog_gcc_g=yes
  883. else
  884.   ac_cv_prog_gcc_g=no
  885. fi
  886. rm -f conftest*
  887.  
  888. fi
  889.  
  890. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  891.     if test $ac_cv_prog_gcc_g = yes; then
  892.       CFLAGS="-g -O"
  893.     else
  894.       CFLAGS="-O"
  895.     fi
  896.   fi
  897. else
  898.   GCC=
  899.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  900. fi
  901.  
  902.  
  903. if test -n "$auto_cflags"; then
  904.   if test "${enable_zsh_debug}" = yes; then
  905.     if test -n "$GCC"; then
  906.       CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -DDEBUG -g"
  907.     else
  908.       CFLAGS="$CFLAGS -DDEBUG -g"
  909.     fi
  910.   else
  911.     if test -n "$GCC"; then
  912.       CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -O2 -DDEBUG"
  913.     else
  914.       CFLAGS="$CFLAGS -O -DDEBUG"
  915.     fi
  916.   fi
  917. fi
  918.  
  919. if test `echo $host_os | sed 's/^\(...\).*/\1/'` = sco; then
  920.   CFLAGS="-D__sco $CFLAGS"
  921. fi
  922.  
  923.  
  924. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  925. # On Suns, sometimes $CPP names a directory.
  926. if test -n "$CPP" && test -d "$CPP"; then
  927.   CPP=
  928. fi
  929. if test -z "$CPP"; then
  930. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  931.   echo $ac_n "(cached) $ac_c" 1>&6
  932. else
  933.     # This must be in double quotes, not single quotes, because CPP may get
  934.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  935.   CPP="${CC-cc} -E"
  936.   # On the NeXT, cc -E runs the code through the compiler's parser,
  937.   # not just through cpp.
  938.   cat > conftest.$ac_ext <<EOF
  939. #line 940 "configure"
  940. #include "confdefs.h"
  941. #include <assert.h>
  942. Syntax Error
  943. EOF
  944. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  945. { (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  946. ac_err=`grep -v '^ *+' conftest.out`
  947. if test -z "$ac_err"; then
  948.   :
  949. else
  950.   echo "$ac_err" >&5
  951.   rm -rf conftest*
  952.   CPP="${CC-cc} -E -traditional-cpp"
  953.   cat > conftest.$ac_ext <<EOF
  954. #line 955 "configure"
  955. #include "confdefs.h"
  956. #include <assert.h>
  957. Syntax Error
  958. EOF
  959. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  960. { (eval echo configure:961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  961. ac_err=`grep -v '^ *+' conftest.out`
  962. if test -z "$ac_err"; then
  963.   :
  964. else
  965.   echo "$ac_err" >&5
  966.   rm -rf conftest*
  967.   CPP=/lib/cpp
  968. fi
  969. rm -f conftest*
  970. fi
  971. rm -f conftest*
  972.   ac_cv_prog_CPP="$CPP"
  973. fi
  974.   CPP="$ac_cv_prog_CPP"
  975. else
  976.   ac_cv_prog_CPP="$CPP"
  977. fi
  978. echo "$ac_t""$CPP" 1>&6
  979.                  if test $ac_cv_prog_gcc = yes; then
  980.     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  981. if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  982.   echo $ac_n "(cached) $ac_c" 1>&6
  983. else
  984.     ac_pattern="Autoconf.*'x'"
  985.   cat > conftest.$ac_ext <<EOF
  986. #line 987 "configure"
  987. #include "confdefs.h"
  988. #include <sgtty.h>
  989. Autoconf TIOCGETP
  990. EOF
  991. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  992.   egrep "$ac_pattern" >/dev/null 2>&1; then
  993.   rm -rf conftest*
  994.   ac_cv_prog_gcc_traditional=yes
  995. else
  996.   rm -rf conftest*
  997.   ac_cv_prog_gcc_traditional=no
  998. fi
  999. rm -f conftest*
  1000.  
  1001.  
  1002.   if test $ac_cv_prog_gcc_traditional = no; then
  1003.     cat > conftest.$ac_ext <<EOF
  1004. #line 1005 "configure"
  1005. #include "confdefs.h"
  1006. #include <termio.h>
  1007. Autoconf TCGETA
  1008. EOF
  1009. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1010.   egrep "$ac_pattern" >/dev/null 2>&1; then
  1011.   rm -rf conftest*
  1012.   ac_cv_prog_gcc_traditional=yes
  1013. fi
  1014. rm -f conftest*
  1015.  
  1016.   fi
  1017. fi
  1018.  
  1019. echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  1020.   if test $ac_cv_prog_gcc_traditional = yes; then
  1021.     CC="$CC -traditional"
  1022.   fi
  1023. fi
  1024.      echo $ac_n "checking for working const""... $ac_c" 1>&6
  1025. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1026.   echo $ac_n "(cached) $ac_c" 1>&6
  1027. else
  1028.   cat > conftest.$ac_ext <<EOF
  1029. #line 1030 "configure"
  1030. #include "confdefs.h"
  1031.  
  1032. int main() { return 0; }
  1033. int t() {
  1034.  
  1035. /* Ultrix mips cc rejects this.  */
  1036. typedef int charset[2]; const charset x;
  1037. /* SunOS 4.1.1 cc rejects this.  */
  1038. char const *const *ccp;
  1039. char **p;
  1040. /* NEC SVR4.0.2 mips cc rejects this.  */
  1041. struct point {int x, y;};
  1042. static struct point const zero = {0,0};
  1043. /* AIX XL C 1.02.0.0 rejects this.
  1044.    It does not let you subtract one const X* pointer from another in an arm
  1045.    of an if-expression whose if-part is not a constant expression */
  1046. const char *g = "string";
  1047. ccp = &g + (g ? g-g : 0);
  1048. /* HPUX 7.0 cc rejects these. */
  1049. ++ccp;
  1050. p = (char**) ccp;
  1051. ccp = (char const *const *) p;
  1052. { /* SCO 3.2v4 cc rejects this.  */
  1053.   char *t;
  1054.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1055.  
  1056.   *t++ = 0;
  1057. }
  1058. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1059.   int x[] = {25, 17};
  1060.   const int *foo = &x[0];
  1061.   ++foo;
  1062. }
  1063. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1064.   typedef const int *iptr;
  1065.   iptr p = 0;
  1066.   ++p;
  1067. }
  1068. { /* AIX XL C 1.02.0.0 rejects this saying
  1069.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1070.   struct s { int j; const int *ap[3]; };
  1071.   struct s *b; b->j = 5;
  1072. }
  1073. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1074.   const int foo = 10;
  1075. }
  1076.  
  1077. ; return 0; }
  1078. EOF
  1079. if { (eval echo configure:1080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1080.   rm -rf conftest*
  1081.   ac_cv_c_const=yes
  1082. else
  1083.   rm -rf conftest*
  1084.   ac_cv_c_const=no
  1085. fi
  1086. rm -f conftest*
  1087.  
  1088. fi
  1089.  
  1090. echo "$ac_t""$ac_cv_c_const" 1>&6
  1091. if test $ac_cv_c_const = no; then
  1092.   cat >> confdefs.h <<\EOF
  1093. #define const 
  1094. EOF
  1095.  
  1096. fi
  1097.                   # If we cannot run a trivial program, we must be cross compiling.
  1098. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1099. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1100.   echo $ac_n "(cached) $ac_c" 1>&6
  1101. else
  1102.   if test "$cross_compiling" = yes; then
  1103.   ac_cv_c_cross=yes
  1104. else
  1105. cat > conftest.$ac_ext <<EOF
  1106. #line 1107 "configure"
  1107. #include "confdefs.h"
  1108. main(){return(0);}
  1109. EOF
  1110. { (eval echo configure:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1111. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1112.   ac_cv_c_cross=no
  1113. else
  1114.   ac_cv_c_cross=yes
  1115. fi
  1116. fi
  1117. rm -fr conftest*
  1118. fi
  1119.  
  1120. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1121. cross_compiling=$ac_cv_c_cross
  1122.                   echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
  1123. if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then
  1124.   echo $ac_n "(cached) $ac_c" 1>&6
  1125. else
  1126.   ac_cv_prog_cc_stdc=no
  1127. ac_save_CFLAGS="$CFLAGS"
  1128. # Don't try gcc -ansi; that turns off useful extensions and
  1129. # breaks some systems' header files.
  1130. # AIX            -qlanglvl=ansi
  1131. # Ultrix and OSF/1    -std1
  1132. # HP-UX            -Aa -D_HPUX_SOURCE
  1133. # SVR4            -Xc
  1134. for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
  1135. do
  1136.   CFLAGS="$ac_save_CFLAGS $ac_arg"
  1137.   cat > conftest.$ac_ext <<EOF
  1138. #line 1139 "configure"
  1139. #include "confdefs.h"
  1140. #ifndef __STDC__
  1141. choke me
  1142. #endif    
  1143.  
  1144. int main() { return 0; }
  1145. int t() {
  1146. int test (int i, double x);
  1147. struct s1 {int (*f) (int a);};
  1148. struct s2 {int (*f) (double a);};
  1149. ; return 0; }
  1150. EOF
  1151. if { (eval echo configure:1152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1152.   rm -rf conftest*
  1153.   ac_cv_prog_cc_stdc="$ac_arg"; break
  1154. fi
  1155. rm -f conftest*
  1156.  
  1157. done
  1158. CFLAGS="$ac_save_CFLAGS"
  1159.  
  1160. fi
  1161.  
  1162. echo "$ac_t""$ac_cv_prog_cc_stdc" 1>&6
  1163. case "x$ac_cv_prog_cc_stdc" in
  1164.   x|xno) ;;
  1165.   *) CC="$CC $ac_cv_prog_cc_stdc" ;;
  1166. esac
  1167.  
  1168.  
  1169. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  1170. if test "$ac_cv_prog_cc_stdc" != no; then
  1171.   echo "$ac_t""yes" 1>&6
  1172.   cat >> confdefs.h <<\EOF
  1173. #define PROTOTYPES 1
  1174. EOF
  1175.  
  1176.   U=
  1177. else
  1178.   echo "$ac_t""no" 1>&6
  1179.   U=_
  1180. fi
  1181.              echo $ac_n "checking size of long""... $ac_c" 1>&6
  1182. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  1183.   echo $ac_n "(cached) $ac_c" 1>&6
  1184. else
  1185.   if test "$cross_compiling" = yes; then
  1186.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1187. else
  1188. cat > conftest.$ac_ext <<EOF
  1189. #line 1190 "configure"
  1190. #include "confdefs.h"
  1191. #include <stdio.h>
  1192. main()
  1193. {
  1194.   FILE *f=fopen("conftestval", "w");
  1195.   if (!f) exit(1);
  1196.   fprintf(f, "%d\n", sizeof(long));
  1197.   exit(0);
  1198. }
  1199. EOF
  1200. { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1201. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1202.   ac_cv_sizeof_long=`cat conftestval`
  1203. else
  1204.   ac_cv_sizeof_long=0
  1205. fi
  1206. fi
  1207. rm -fr conftest*
  1208. fi
  1209. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  1210. cat >> confdefs.h <<EOF
  1211. #define SIZEOF_LONG $ac_cv_sizeof_long
  1212. EOF
  1213.  
  1214.        
  1215. echo $ac_n "checking if signed to unsigned casting is broken""... $ac_c" 1>&6
  1216. if eval "test \"`echo '$''{'zsh_broken_signed_to_unsigned_casting'+set}'`\" = set"; then
  1217.   echo $ac_n "(cached) $ac_c" 1>&6
  1218. else
  1219.   if test "$cross_compiling" = yes; then
  1220.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1221. else
  1222. cat > conftest.$ac_ext <<EOF
  1223. #line 1224 "configure"
  1224. #include "confdefs.h"
  1225. main(){return((int)(unsigned char)((char) -1) == 255);}
  1226. EOF
  1227. { (eval echo configure:1228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1228. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1229.   zsh_broken_signed_to_unsigned_casting=yes
  1230. else
  1231.   zsh_broken_signed_to_unsigned_casting=no
  1232. fi
  1233. fi
  1234. rm -fr conftest*
  1235. fi
  1236.  
  1237. echo "$ac_t""$zsh_broken_signed_to_unsigned_casting" 1>&6
  1238. if test $zsh_broken_signed_to_unsigned_casting = yes; then
  1239.   cat >> confdefs.h <<\EOF
  1240. #define BROKEN_SIGNED_TO_UNSIGNED_CASTING 1
  1241. EOF
  1242.  
  1243. fi
  1244.  
  1245. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  1246. set dummy ${MAKE-make}; ac_make=$2
  1247. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  1248.   echo $ac_n "(cached) $ac_c" 1>&6
  1249. else
  1250.   cat > conftestmake <<\EOF
  1251. all:
  1252.     @echo 'ac_maketemp="${MAKE}"'
  1253. EOF
  1254. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1255. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  1256. if test -n "$ac_maketemp"; then
  1257.   eval ac_cv_prog_make_${ac_make}_set=yes
  1258. else
  1259.   eval ac_cv_prog_make_${ac_make}_set=no
  1260. fi
  1261. rm -f conftestmake
  1262. fi
  1263. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  1264.   echo "$ac_t""yes" 1>&6
  1265.   SET_MAKE=
  1266. else
  1267.   echo "$ac_t""no" 1>&6
  1268.   SET_MAKE="MAKE=${MAKE-make}"
  1269. fi
  1270.             # Find a good install program.  We prefer a C program (faster),
  1271. # so one script is as good as another.  But avoid the broken or
  1272. # incompatible versions:
  1273. # SysV /etc/install, /usr/sbin/install
  1274. # SunOS /usr/etc/install
  1275. # IRIX /sbin/install
  1276. # AIX /bin/install
  1277. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1278. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1279. # ./install, which can be erroneously created by make from ./install.sh.
  1280. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1281. if test -z "$INSTALL"; then
  1282. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  1283.   echo $ac_n "(cached) $ac_c" 1>&6
  1284. else
  1285.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1286.   for ac_dir in $PATH; do
  1287.     # Account for people who put trailing slashes in PATH elements.
  1288.     case "$ac_dir/" in
  1289.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1290.     *)
  1291.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1292.       for ac_prog in ginstall installbsd scoinst install; do
  1293.         if test -f $ac_dir/$ac_prog; then
  1294.       if test $ac_prog = install &&
  1295.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1296.         # AIX install.  It has an incompatible calling convention.
  1297.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1298.         :
  1299.       else
  1300.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1301.         break 2
  1302.       fi
  1303.     fi
  1304.       done
  1305.       ;;
  1306.     esac
  1307.   done
  1308.   IFS="$ac_save_ifs"
  1309.  
  1310. fi
  1311.   if test "${ac_cv_path_install+set}" = set; then
  1312.     INSTALL="$ac_cv_path_install"
  1313.   else
  1314.     # As a last resort, use the slow shell script.  We don't cache a
  1315.     # path for INSTALL within a source directory, because that will
  1316.     # break other packages using the cache if that directory is
  1317.     # removed, or if the path is relative.
  1318.     INSTALL="$ac_install_sh"
  1319.   fi
  1320. fi
  1321. echo "$ac_t""$INSTALL" 1>&6
  1322.  
  1323. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1324. # It thinks the first close brace ends the variable substitution.
  1325. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1326.  
  1327. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1328.              for ac_prog in mawk gawk nawk awk
  1329. do
  1330. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1331. set dummy $ac_prog; ac_word=$2
  1332. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1333. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  1334.   echo $ac_n "(cached) $ac_c" 1>&6
  1335. else
  1336.   if test -n "$AWK"; then
  1337.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  1338. else
  1339.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1340.   for ac_dir in $PATH; do
  1341.     test -z "$ac_dir" && ac_dir=.
  1342.     if test -f $ac_dir/$ac_word; then
  1343.       ac_cv_prog_AWK="$ac_prog"
  1344.       break
  1345.     fi
  1346.   done
  1347.   IFS="$ac_save_ifs"
  1348. fi
  1349. fi
  1350. AWK="$ac_cv_prog_AWK"
  1351. if test -n "$AWK"; then
  1352.   echo "$ac_t""$AWK" 1>&6
  1353. else
  1354.   echo "$ac_t""no" 1>&6
  1355. fi
  1356.  
  1357. test -n "$AWK" && break
  1358. done
  1359.                  
  1360. ac_header_dirent=no
  1361. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1362. do
  1363. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1364. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1365. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1366.   echo $ac_n "(cached) $ac_c" 1>&6
  1367. else
  1368.   cat > conftest.$ac_ext <<EOF
  1369. #line 1370 "configure"
  1370. #include "confdefs.h"
  1371. #include <sys/types.h>
  1372. #include <$ac_hdr>
  1373. int main() { return 0; }
  1374. int t() {
  1375. DIR *dirp = 0;
  1376. ; return 0; }
  1377. EOF
  1378. if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1379.   rm -rf conftest*
  1380.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1381. else
  1382.   rm -rf conftest*
  1383.   eval "ac_cv_header_dirent_$ac_safe=no"
  1384. fi
  1385. rm -f conftest*
  1386.  
  1387. fi
  1388. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1389.   echo "$ac_t""yes" 1>&6
  1390.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
  1391.   cat >> confdefs.h <<EOF
  1392. #define $ac_tr_hdr 1
  1393. EOF
  1394.  ac_header_dirent=$ac_hdr; break
  1395. else
  1396.   echo "$ac_t""no" 1>&6
  1397. fi
  1398. done
  1399. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1400. if test $ac_header_dirent = dirent.h; then
  1401. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  1402. ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
  1403. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1404.   echo $ac_n "(cached) $ac_c" 1>&6
  1405. else
  1406.   ac_save_LIBS="$LIBS"
  1407. LIBS="-ldir  $LIBS"
  1408. cat > conftest.$ac_ext <<EOF
  1409. #line 1410 "configure"
  1410. #include "confdefs.h"
  1411. /* Override any gcc2 internal prototype to avoid an error.  */
  1412. /* We use char because int might match the return type of a gcc2
  1413.     builtin and then its argument prototype would still apply.  */
  1414. char opendir();
  1415.  
  1416. int main() { return 0; }
  1417. int t() {
  1418. opendir()
  1419. ; return 0; }
  1420. EOF
  1421. if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1422.   rm -rf conftest*
  1423.   eval "ac_cv_lib_$ac_lib_var=yes"
  1424. else
  1425.   rm -rf conftest*
  1426.   eval "ac_cv_lib_$ac_lib_var=no"
  1427. fi
  1428. rm -f conftest*
  1429. LIBS="$ac_save_LIBS"
  1430.  
  1431. fi
  1432. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1433.   echo "$ac_t""yes" 1>&6
  1434.   LIBS="$LIBS -ldir"
  1435. else
  1436.   echo "$ac_t""no" 1>&6
  1437. fi
  1438.  
  1439. else
  1440. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  1441. ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
  1442. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1443.   echo $ac_n "(cached) $ac_c" 1>&6
  1444. else
  1445.   ac_save_LIBS="$LIBS"
  1446. LIBS="-lx  $LIBS"
  1447. cat > conftest.$ac_ext <<EOF
  1448. #line 1449 "configure"
  1449. #include "confdefs.h"
  1450. /* Override any gcc2 internal prototype to avoid an error.  */
  1451. /* We use char because int might match the return type of a gcc2
  1452.     builtin and then its argument prototype would still apply.  */
  1453. char opendir();
  1454.  
  1455. int main() { return 0; }
  1456. int t() {
  1457. opendir()
  1458. ; return 0; }
  1459. EOF
  1460. if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1461.   rm -rf conftest*
  1462.   eval "ac_cv_lib_$ac_lib_var=yes"
  1463. else
  1464.   rm -rf conftest*
  1465.   eval "ac_cv_lib_$ac_lib_var=no"
  1466. fi
  1467. rm -f conftest*
  1468. LIBS="$ac_save_LIBS"
  1469.  
  1470. fi
  1471. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1472.   echo "$ac_t""yes" 1>&6
  1473.   LIBS="$LIBS -lx"
  1474. else
  1475.   echo "$ac_t""no" 1>&6
  1476. fi
  1477.  
  1478. fi
  1479.  
  1480. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1481. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1482.   echo $ac_n "(cached) $ac_c" 1>&6
  1483. else
  1484.   cat > conftest.$ac_ext <<EOF
  1485. #line 1486 "configure"
  1486. #include "confdefs.h"
  1487. #include <stdlib.h>
  1488. #include <stdarg.h>
  1489. #include <string.h>
  1490. #include <float.h>
  1491. EOF
  1492. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1493. { (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1494. ac_err=`grep -v '^ *+' conftest.out`
  1495. if test -z "$ac_err"; then
  1496.   rm -rf conftest*
  1497.   ac_cv_header_stdc=yes
  1498. else
  1499.   echo "$ac_err" >&5
  1500.   rm -rf conftest*
  1501.   ac_cv_header_stdc=no
  1502. fi
  1503. rm -f conftest*
  1504.  
  1505. if test $ac_cv_header_stdc = yes; then
  1506.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1507. cat > conftest.$ac_ext <<EOF
  1508. #line 1509 "configure"
  1509. #include "confdefs.h"
  1510. #include <string.h>
  1511. EOF
  1512. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1513.   egrep "memchr" >/dev/null 2>&1; then
  1514.   :
  1515. else
  1516.   rm -rf conftest*
  1517.   ac_cv_header_stdc=no
  1518. fi
  1519. rm -f conftest*
  1520.  
  1521. fi
  1522.  
  1523. if test $ac_cv_header_stdc = yes; then
  1524.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1525. cat > conftest.$ac_ext <<EOF
  1526. #line 1527 "configure"
  1527. #include "confdefs.h"
  1528. #include <stdlib.h>
  1529. EOF
  1530. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1531.   egrep "free" >/dev/null 2>&1; then
  1532.   :
  1533. else
  1534.   rm -rf conftest*
  1535.   ac_cv_header_stdc=no
  1536. fi
  1537. rm -f conftest*
  1538.  
  1539. fi
  1540.  
  1541. if test $ac_cv_header_stdc = yes; then
  1542.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1543. if test "$cross_compiling" = yes; then
  1544.   :
  1545. else
  1546. cat > conftest.$ac_ext <<EOF
  1547. #line 1548 "configure"
  1548. #include "confdefs.h"
  1549. #include <ctype.h>
  1550. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1551. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1552. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1553. int main () { int i; for (i = 0; i < 256; i++)
  1554. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1555. exit (0); }
  1556.  
  1557. EOF
  1558. { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1559. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1560.   :
  1561. else
  1562.   ac_cv_header_stdc=no
  1563. fi
  1564. fi
  1565. rm -fr conftest*
  1566. fi
  1567. fi
  1568.  
  1569. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1570. if test $ac_cv_header_stdc = yes; then
  1571.   cat >> confdefs.h <<\EOF
  1572. #define STDC_HEADERS 1
  1573. EOF
  1574.  
  1575. fi
  1576.  
  1577. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1578. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1579.   echo $ac_n "(cached) $ac_c" 1>&6
  1580. else
  1581.   cat > conftest.$ac_ext <<EOF
  1582. #line 1583 "configure"
  1583. #include "confdefs.h"
  1584. #include <sys/types.h>
  1585. #include <sys/time.h>
  1586. #include <time.h>
  1587. int main() { return 0; }
  1588. int t() {
  1589. struct tm *tp;
  1590. ; return 0; }
  1591. EOF
  1592. if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1593.   rm -rf conftest*
  1594.   ac_cv_header_time=yes
  1595. else
  1596.   rm -rf conftest*
  1597.   ac_cv_header_time=no
  1598. fi
  1599. rm -f conftest*
  1600.  
  1601. fi
  1602.  
  1603. echo "$ac_t""$ac_cv_header_time" 1>&6
  1604. if test $ac_cv_header_time = yes; then
  1605.   cat >> confdefs.h <<\EOF
  1606. #define TIME_WITH_SYS_TIME 1
  1607. EOF
  1608.  
  1609. fi
  1610.  
  1611. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
  1612. if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1613.   echo $ac_n "(cached) $ac_c" 1>&6
  1614. else
  1615.   cat > conftest.$ac_ext <<EOF
  1616. #line 1617 "configure"
  1617. #include "confdefs.h"
  1618. #include <sys/types.h>
  1619. #include <sys/stat.h>
  1620.  
  1621. #if defined(S_ISBLK) && defined(S_IFDIR)
  1622. # if S_ISBLK (S_IFDIR)
  1623. You lose.
  1624. # endif
  1625. #endif
  1626.  
  1627. #if defined(S_ISBLK) && defined(S_IFCHR)
  1628. # if S_ISBLK (S_IFCHR)
  1629. You lose.
  1630. # endif
  1631. #endif
  1632.  
  1633. #if defined(S_ISLNK) && defined(S_IFREG)
  1634. # if S_ISLNK (S_IFREG)
  1635. You lose.
  1636. # endif
  1637. #endif
  1638.  
  1639. #if defined(S_ISSOCK) && defined(S_IFREG)
  1640. # if S_ISSOCK (S_IFREG)
  1641. You lose.
  1642. # endif
  1643. #endif
  1644.  
  1645. EOF
  1646. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1647.   egrep "You lose" >/dev/null 2>&1; then
  1648.   rm -rf conftest*
  1649.   ac_cv_header_stat_broken=yes
  1650. else
  1651.   rm -rf conftest*
  1652.   ac_cv_header_stat_broken=no
  1653. fi
  1654. rm -f conftest*
  1655.  
  1656. fi
  1657.  
  1658. echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
  1659. if test $ac_cv_header_stat_broken = yes; then
  1660.   cat >> confdefs.h <<\EOF
  1661. #define STAT_MACROS_BROKEN 1
  1662. EOF
  1663.  
  1664. fi
  1665.  
  1666. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  1667. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1668.   echo $ac_n "(cached) $ac_c" 1>&6
  1669. else
  1670.   cat > conftest.$ac_ext <<EOF
  1671. #line 1672 "configure"
  1672. #include "confdefs.h"
  1673. #include <sys/types.h>
  1674. #include <sys/wait.h>
  1675. #ifndef WEXITSTATUS
  1676. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1677. #endif
  1678. #ifndef WIFEXITED
  1679. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1680. #endif
  1681. int main() { return 0; }
  1682. int t() {
  1683. int s;
  1684. wait (&s);
  1685. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1686. ; return 0; }
  1687. EOF
  1688. if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1689.   rm -rf conftest*
  1690.   ac_cv_header_sys_wait_h=yes
  1691. else
  1692.   rm -rf conftest*
  1693.   ac_cv_header_sys_wait_h=no
  1694. fi
  1695. rm -f conftest*
  1696.  
  1697. fi
  1698.  
  1699. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  1700. if test $ac_cv_header_sys_wait_h = yes; then
  1701.   cat >> confdefs.h <<\EOF
  1702. #define HAVE_SYS_WAIT_H 1
  1703. EOF
  1704.  
  1705. fi
  1706.  
  1707. for ac_hdr in sys/time.h sys/times.h sys/select.h termcap.h termio.h \
  1708.          termios.h sys/param.h sys/filio.h string.h memory.h \
  1709.          limits.h fcntl.h libc.h sys/utsname.h sys/resource.h \
  1710.          locale.h errno.h stdlib.h unistd.h
  1711. do
  1712. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1713. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1714. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1715.   echo $ac_n "(cached) $ac_c" 1>&6
  1716. else
  1717.   cat > conftest.$ac_ext <<EOF
  1718. #line 1719 "configure"
  1719. #include "confdefs.h"
  1720. #include <$ac_hdr>
  1721. EOF
  1722. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1723. { (eval echo configure:1724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1724. ac_err=`grep -v '^ *+' conftest.out`
  1725. if test -z "$ac_err"; then
  1726.   rm -rf conftest*
  1727.   eval "ac_cv_header_$ac_safe=yes"
  1728. else
  1729.   echo "$ac_err" >&5
  1730.   rm -rf conftest*
  1731.   eval "ac_cv_header_$ac_safe=no"
  1732. fi
  1733. rm -f conftest*
  1734. fi
  1735. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1736.   echo "$ac_t""yes" 1>&6
  1737.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1738.   cat >> confdefs.h <<EOF
  1739. #define $ac_tr_hdr 1
  1740. EOF
  1741.  
  1742. else
  1743.   echo "$ac_t""no" 1>&6
  1744. fi
  1745. done
  1746.  
  1747.  
  1748. if test $ac_cv_header_sys_time_h = yes -a $ac_cv_header_sys_select_h = yes; then
  1749.   echo $ac_n "checking for conflicts in sys/time.h and sys/select.h""... $ac_c" 1>&6
  1750. if eval "test \"`echo '$''{'zsh_cv_time_h_select_h_conflicts'+set}'`\" = set"; then
  1751.   echo $ac_n "(cached) $ac_c" 1>&6
  1752. else
  1753.   cat > conftest.$ac_ext <<EOF
  1754. #line 1755 "configure"
  1755. #include "confdefs.h"
  1756. #include <sys/time.h>
  1757. #include <sys/select.h>
  1758. int main() { return 0; }
  1759. int t() {
  1760. int i;
  1761. ; return 0; }
  1762. EOF
  1763. if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1764.   rm -rf conftest*
  1765.   zsh_cv_time_h_select_h_conflicts=no
  1766. else
  1767.   rm -rf conftest*
  1768.   zsh_cv_time_h_select_h_conflicts=yes
  1769. fi
  1770. rm -f conftest*
  1771.  
  1772. fi
  1773.  
  1774. echo "$ac_t""$zsh_cv_time_h_select_h_conflicts" 1>&6
  1775.   if test $zsh_cv_time_h_select_h_conflicts = yes; then
  1776.     cat >> confdefs.h <<\EOF
  1777. #define TIME_H_SELECT_H_CONFLICTS 1
  1778. EOF
  1779.  
  1780.   fi
  1781. fi
  1782.  
  1783. echo $ac_n "checking ut_host in struct utmp""... $ac_c" 1>&6
  1784. if eval "test \"`echo '$''{'zsh_cv_func_ut_host_in_utmp'+set}'`\" = set"; then
  1785.   echo $ac_n "(cached) $ac_c" 1>&6
  1786. else
  1787.   cat > conftest.$ac_ext <<EOF
  1788. #line 1789 "configure"
  1789. #include "confdefs.h"
  1790. #include <sys/types.h>
  1791. #include <utmp.h>
  1792. int main() { return 0; }
  1793. int t() {
  1794. struct utmp ut; ut.ut_host;
  1795. ; return 0; }
  1796. EOF
  1797. if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1798.   rm -rf conftest*
  1799.   zsh_cv_func_ut_host_in_utmp=yes
  1800. else
  1801.   rm -rf conftest*
  1802.   zsh_cv_func_ut_host_in_utmp=no
  1803. fi
  1804. rm -f conftest*
  1805.  
  1806. fi
  1807.  
  1808. echo "$ac_t""$zsh_cv_func_ut_host_in_utmp" 1>&6
  1809. if test $zsh_cv_func_ut_host_in_utmp = yes; then
  1810.   have_ut_host=1
  1811.   cat >> confdefs.h <<\EOF
  1812. #define HAVE_UT_HOST 1
  1813. EOF
  1814.  
  1815. fi
  1816.  
  1817. if test -z "$have_ut_host"; then
  1818.   echo $ac_n "checking ut_host in struct utmpx""... $ac_c" 1>&6
  1819. if eval "test \"`echo '$''{'zsh_cv_func_ut_host_in_utmpx'+set}'`\" = set"; then
  1820.   echo $ac_n "(cached) $ac_c" 1>&6
  1821. else
  1822.   cat > conftest.$ac_ext <<EOF
  1823. #line 1824 "configure"
  1824. #include "confdefs.h"
  1825. #include <sys/types.h>
  1826. #include <utmpx.h>
  1827. int main() { return 0; }
  1828. int t() {
  1829. struct utmpx ut; ut.ut_host;
  1830. ; return 0; }
  1831. EOF
  1832. if { (eval echo configure:1833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1833.   rm -rf conftest*
  1834.   zsh_cv_func_ut_host_in_utmpx=yes
  1835. else
  1836.   rm -rf conftest*
  1837.   zsh_cv_func_ut_host_in_utmpx=no
  1838. fi
  1839. rm -f conftest*
  1840.  
  1841. fi
  1842.  
  1843. echo "$ac_t""$zsh_cv_func_ut_host_in_utmpx" 1>&6
  1844.   if test $zsh_cv_func_ut_host_in_utmpx = yes; then
  1845.     cat >> confdefs.h <<\EOF
  1846. #define HAVE_UTMPX_H 1
  1847. EOF
  1848.  
  1849.     cat >> confdefs.h <<\EOF
  1850. #define HAVE_UT_HOST 1
  1851. EOF
  1852.  
  1853.   fi
  1854. fi
  1855.  
  1856. echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
  1857. if eval "test \"`echo '$''{'zsh_cv_sys_posix_termios'+set}'`\" = set"; then
  1858.   echo $ac_n "(cached) $ac_c" 1>&6
  1859. else
  1860.   cat > conftest.$ac_ext <<EOF
  1861. #line 1862 "configure"
  1862. #include "confdefs.h"
  1863. #include <sys/types.h>
  1864. #include <unistd.h>
  1865. #include <termios.h>
  1866. int main() { return 0; }
  1867. int t() {
  1868. /* SunOS 4.0.3 has termios.h but not the library calls.  */
  1869. tcgetattr(0, 0);
  1870. ; return 0; }
  1871. EOF
  1872. if { (eval echo configure:1873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1873.   rm -rf conftest*
  1874.   zsh_cv_sys_posix_termios=yes
  1875. else
  1876.   rm -rf conftest*
  1877.   zsh_cv_sys_posix_termios=no
  1878. fi
  1879. rm -f conftest*
  1880.  
  1881. fi
  1882.  
  1883. echo "$ac_t""$zsh_cv_sys_posix_termios" 1>&6
  1884.  
  1885. if test $zsh_cv_sys_posix_termios = yes; then
  1886.   echo $ac_n "checking TIOCGWINSZ in termios.h""... $ac_c" 1>&6
  1887. if eval "test \"`echo '$''{'zsh_cv_sys_tiocgwinsz_in_termios_h'+set}'`\" = set"; then
  1888.   echo $ac_n "(cached) $ac_c" 1>&6
  1889. else
  1890.   cat > conftest.$ac_ext <<EOF
  1891. #line 1892 "configure"
  1892. #include "confdefs.h"
  1893. #include <sys/types.h>
  1894. #include <termios.h>
  1895. int main() { return 0; }
  1896. int t() {
  1897. int x = TIOCGWINSZ;
  1898. ; return 0; }
  1899. EOF
  1900. if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1901.   rm -rf conftest*
  1902.   zsh_cv_sys_tiocgwinsz_in_termios_h=yes
  1903. else
  1904.   rm -rf conftest*
  1905.   zsh_cv_sys_tiocgwinsz_in_termios_h=no
  1906. fi
  1907. rm -f conftest*
  1908.  
  1909. fi
  1910.  
  1911. echo "$ac_t""$zsh_cv_sys_tiocgwinsz_in_termios_h" 1>&6
  1912. else
  1913.   zsh_cv_sys_tiocgwinsz_in_termios_h=no
  1914. fi
  1915.  
  1916. if test $zsh_cv_sys_tiocgwinsz_in_termios_h = no; then
  1917.   echo $ac_n "checking TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
  1918. if eval "test \"`echo '$''{'zsh_cv_sys_tiocgwinsz_in_sys_ioctl_h'+set}'`\" = set"; then
  1919.   echo $ac_n "(cached) $ac_c" 1>&6
  1920. else
  1921.   cat > conftest.$ac_ext <<EOF
  1922. #line 1923 "configure"
  1923. #include "confdefs.h"
  1924. #include <sys/types.h>
  1925. #include <sys/ioctl.h>
  1926. int main() { return 0; }
  1927. int t() {
  1928. int x = TIOCGWINSZ;
  1929. ; return 0; }
  1930. EOF
  1931. if { (eval echo configure:1932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1932.   rm -rf conftest*
  1933.   zsh_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
  1934. else
  1935.   rm -rf conftest*
  1936.   zsh_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
  1937. fi
  1938. rm -f conftest*
  1939.  
  1940. fi
  1941.  
  1942. echo "$ac_t""$zsh_cv_sys_tiocgwinsz_in_sys_ioctl_h" 1>&6
  1943.   if test $zsh_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
  1944.     cat >> confdefs.h <<\EOF
  1945. #define GWINSZ_IN_SYS_IOCTL 1
  1946. EOF
  1947.  
  1948.   fi
  1949. fi
  1950.  
  1951. ac_safe=`echo "sys/ptem.h" | tr './\055' '___'`
  1952. echo $ac_n "checking for sys/ptem.h""... $ac_c" 1>&6
  1953. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1954.   echo $ac_n "(cached) $ac_c" 1>&6
  1955. else
  1956.   cat > conftest.$ac_ext <<EOF
  1957. #line 1958 "configure"
  1958. #include "confdefs.h"
  1959. #include <sys/ptem.h>
  1960. EOF
  1961. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1962. { (eval echo configure:1963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1963. ac_err=`grep -v '^ *+' conftest.out`
  1964. if test -z "$ac_err"; then
  1965.   rm -rf conftest*
  1966.   eval "ac_cv_header_$ac_safe=yes"
  1967. else
  1968.   echo "$ac_err" >&5
  1969.   rm -rf conftest*
  1970.   eval "ac_cv_header_$ac_safe=no"
  1971. fi
  1972. rm -f conftest*
  1973. fi
  1974. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1975.   echo "$ac_t""yes" 1>&6
  1976.   cat >> confdefs.h <<\EOF
  1977. #define WINSIZE_IN_PTEM 1
  1978. EOF
  1979.  
  1980. else
  1981.   echo "$ac_t""no" 1>&6
  1982. fi
  1983.  
  1984.  
  1985. if test `echo $host_os | sed 's/^.*\(aix3\.2\).*$/\1/'` = aix3.2; then
  1986.   termcap_curses_order="curses ncurses termcap"
  1987. else
  1988.   termcap_curses_order="termcap curses ncurses"
  1989. fi
  1990.  
  1991. for lib in $termcap_curses_order; do
  1992.   echo $ac_n "checking for -l${lib}""... $ac_c" 1>&6
  1993. ac_lib_var=`echo ${lib}'_'tgetent | tr './+\055' '__p_'`
  1994. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1995.   echo $ac_n "(cached) $ac_c" 1>&6
  1996. else
  1997.   ac_save_LIBS="$LIBS"
  1998. LIBS="-l${lib}  $LIBS"
  1999. cat > conftest.$ac_ext <<EOF
  2000. #line 2001 "configure"
  2001. #include "confdefs.h"
  2002. /* Override any gcc2 internal prototype to avoid an error.  */
  2003. /* We use char because int might match the return type of a gcc2
  2004.     builtin and then its argument prototype would still apply.  */
  2005. char tgetent();
  2006.  
  2007. int main() { return 0; }
  2008. int t() {
  2009. tgetent()
  2010. ; return 0; }
  2011. EOF
  2012. if { (eval echo configure:2013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2013.   rm -rf conftest*
  2014.   eval "ac_cv_lib_$ac_lib_var=yes"
  2015. else
  2016.   rm -rf conftest*
  2017.   eval "ac_cv_lib_$ac_lib_var=no"
  2018. fi
  2019. rm -f conftest*
  2020. LIBS="$ac_save_LIBS"
  2021.  
  2022. fi
  2023. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2024.   echo "$ac_t""yes" 1>&6
  2025.   LIBS="$LIBS -l$lib"; break
  2026. else
  2027.   echo "$ac_t""no" 1>&6
  2028. fi
  2029.  
  2030. done
  2031.  
  2032. for ac_func in getdomainname
  2033. do
  2034. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2035. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2036.   echo $ac_n "(cached) $ac_c" 1>&6
  2037. else
  2038.   cat > conftest.$ac_ext <<EOF
  2039. #line 2040 "configure"
  2040. #include "confdefs.h"
  2041. /* System header to define __stub macros and hopefully few prototypes,
  2042.     which can conflict with char $ac_func(); below.  */
  2043. #include <assert.h>
  2044. /* Override any gcc2 internal prototype to avoid an error.  */
  2045. /* We use char because int might match the return type of a gcc2
  2046.     builtin and then its argument prototype would still apply.  */
  2047. char $ac_func();
  2048.  
  2049. int main() { return 0; }
  2050. int t() {
  2051.  
  2052. /* The GNU C library defines this for functions which it implements
  2053.     to always fail with ENOSYS.  Some functions are actually named
  2054.     something starting with __ and the normal name is an alias.  */
  2055. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2056. choke me
  2057. #else
  2058. $ac_func();
  2059. #endif
  2060.  
  2061. ; return 0; }
  2062. EOF
  2063. if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2064.   rm -rf conftest*
  2065.   eval "ac_cv_func_$ac_func=yes"
  2066. else
  2067.   rm -rf conftest*
  2068.   eval "ac_cv_func_$ac_func=no"
  2069. fi
  2070. rm -f conftest*
  2071.  
  2072. fi
  2073. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2074.   echo "$ac_t""yes" 1>&6
  2075.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2076.   cat >> confdefs.h <<EOF
  2077. #define $ac_tr_func 1
  2078. EOF
  2079.  
  2080. else
  2081.   echo "$ac_t""no" 1>&6
  2082. fi
  2083. done
  2084.  
  2085. if test $ac_cv_func_getdomainname = no; then
  2086.   echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  2087. ac_lib_var=`echo nsl'_'getdomainname | tr './+\055' '__p_'`
  2088. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2089.   echo $ac_n "(cached) $ac_c" 1>&6
  2090. else
  2091.   ac_save_LIBS="$LIBS"
  2092. LIBS="-lnsl  $LIBS"
  2093. cat > conftest.$ac_ext <<EOF
  2094. #line 2095 "configure"
  2095. #include "confdefs.h"
  2096. /* Override any gcc2 internal prototype to avoid an error.  */
  2097. /* We use char because int might match the return type of a gcc2
  2098.     builtin and then its argument prototype would still apply.  */
  2099. char getdomainname();
  2100.  
  2101. int main() { return 0; }
  2102. int t() {
  2103. getdomainname()
  2104. ; return 0; }
  2105. EOF
  2106. if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2107.   rm -rf conftest*
  2108.   eval "ac_cv_lib_$ac_lib_var=yes"
  2109. else
  2110.   rm -rf conftest*
  2111.   eval "ac_cv_lib_$ac_lib_var=no"
  2112. fi
  2113. rm -f conftest*
  2114. LIBS="$ac_save_LIBS"
  2115.  
  2116. fi
  2117. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2118.   echo "$ac_t""yes" 1>&6
  2119.     ac_tr_lib=HAVE_LIB`echo nsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2120.   cat >> confdefs.h <<EOF
  2121. #define $ac_tr_lib 1
  2122. EOF
  2123.  
  2124.   LIBS="-lnsl $LIBS"
  2125.  
  2126. else
  2127.   echo "$ac_t""no" 1>&6
  2128. fi
  2129.  
  2130. fi
  2131.  
  2132. echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6
  2133. if eval "test \"`echo '$''{'zsh_cv_include_defines_ospeed'+set}'`\" = set"; then
  2134.   echo $ac_n "(cached) $ac_c" 1>&6
  2135. else
  2136.   cat > conftest.$ac_ext <<EOF
  2137. #line 2138 "configure"
  2138. #include "confdefs.h"
  2139. #include <sys/types.h>
  2140. #if HAVE_TERMIOS_H
  2141. #include <termios.h>
  2142. #endif
  2143. #if HAVE_TERMCAP_H
  2144. #include <termcap.h>
  2145. #endif
  2146. int main() { return 0; }
  2147. int t() {
  2148. ospeed = 0;
  2149. ; return 0; }
  2150. EOF
  2151. if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2152.   rm -rf conftest*
  2153.   zsh_cv_include_defines_ospeed=yes
  2154. else
  2155.   rm -rf conftest*
  2156.   zsh_cv_include_defines_ospeed=no
  2157. fi
  2158. rm -f conftest*
  2159.  
  2160. fi
  2161.  
  2162. echo "$ac_t""$zsh_cv_include_defines_ospeed" 1>&6
  2163.  
  2164. if test $zsh_cv_include_defines_ospeed = no; then
  2165.   echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6
  2166. if eval "test \"`echo '$''{'zsh_cv_must_define_ospeed'+set}'`\" = set"; then
  2167.   echo $ac_n "(cached) $ac_c" 1>&6
  2168. else
  2169.   cat > conftest.$ac_ext <<EOF
  2170. #line 2171 "configure"
  2171. #include "confdefs.h"
  2172.  
  2173. int main() { return 0; }
  2174. int t() {
  2175. extern short ospeed; ospeed = 0;
  2176. ; return 0; }
  2177. EOF
  2178. if { (eval echo configure:2179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2179.   rm -rf conftest*
  2180.   zsh_cv_must_define_ospeed=yes
  2181. else
  2182.   rm -rf conftest*
  2183.   zsh_cv_must_define_ospeed=no
  2184. fi
  2185. rm -f conftest*
  2186.  
  2187. fi
  2188.  
  2189. echo "$ac_t""$zsh_cv_must_define_ospeed" 1>&6
  2190. fi
  2191.  
  2192. if test $zsh_cv_include_defines_ospeed = yes; then
  2193.   cat >> confdefs.h <<\EOF
  2194. #define HAVE_OSPEED 1
  2195. EOF
  2196.  
  2197. elif test $zsh_cv_must_define_ospeed = yes; then
  2198.   cat >> confdefs.h <<\EOF
  2199. #define HAVE_OSPEED 1
  2200. EOF
  2201.  
  2202.   cat >> confdefs.h <<\EOF
  2203. #define MUST_DEFINE_OSPEED 1
  2204. EOF
  2205.  
  2206. fi
  2207.  
  2208. echo $ac_n "checking if tgetent accepts NULL""... $ac_c" 1>&6
  2209. if eval "test \"`echo '$''{'zsh_cv_tgetent_accepts_null'+set}'`\" = set"; then
  2210.   echo $ac_n "(cached) $ac_c" 1>&6
  2211. else
  2212.   if test "$cross_compiling" = yes; then
  2213.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2214. else
  2215. cat > conftest.$ac_ext <<EOF
  2216. #line 2217 "configure"
  2217. #include "confdefs.h"
  2218. main(){int i = tgetent((char*)0,"vt100");exit(!i || i == -1);}
  2219. EOF
  2220. { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  2221. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2222.   zsh_cv_tgetent_accepts_null=yes
  2223. else
  2224.   zsh_cv_tgetent_accepts_null=no
  2225. fi
  2226. fi
  2227. rm -fr conftest*
  2228. fi
  2229.  
  2230. echo "$ac_t""$zsh_cv_tgetent_accepts_null" 1>&6
  2231. if test $zsh_cv_tgetent_accepts_null = yes; then
  2232.   cat >> confdefs.h <<\EOF
  2233. #define TGETENT_ACCEPTS_NULL 1
  2234. EOF
  2235.  
  2236. fi
  2237.  
  2238. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  2239. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  2240.   echo $ac_n "(cached) $ac_c" 1>&6
  2241. else
  2242.   cat > conftest.$ac_ext <<EOF
  2243. #line 2244 "configure"
  2244. #include "confdefs.h"
  2245. #include <sys/types.h>
  2246. #include <signal.h>
  2247. #ifdef signal
  2248. #undef signal
  2249. #endif
  2250. #ifdef __cplusplus
  2251. extern "C" void (*signal (int, void (*)(int)))(int);
  2252. #else
  2253. void (*signal ()) ();
  2254. #endif
  2255.  
  2256. int main() { return 0; }
  2257. int t() {
  2258. int i;
  2259. ; return 0; }
  2260. EOF
  2261. if { (eval echo configure:2262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2262.   rm -rf conftest*
  2263.   ac_cv_type_signal=void
  2264. else
  2265.   rm -rf conftest*
  2266.   ac_cv_type_signal=int
  2267. fi
  2268. rm -f conftest*
  2269.  
  2270. fi
  2271.  
  2272. echo "$ac_t""$ac_cv_type_signal" 1>&6
  2273. cat >> confdefs.h <<EOF
  2274. #define RETSIGTYPE $ac_cv_type_signal
  2275. EOF
  2276.  
  2277.  
  2278. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2279. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2280.   echo $ac_n "(cached) $ac_c" 1>&6
  2281. else
  2282.   cat > conftest.$ac_ext <<EOF
  2283. #line 2284 "configure"
  2284. #include "confdefs.h"
  2285. #include <sys/types.h>
  2286. #if STDC_HEADERS
  2287. #include <stdlib.h>
  2288. #endif
  2289. EOF
  2290. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2291.   egrep "pid_t" >/dev/null 2>&1; then
  2292.   rm -rf conftest*
  2293.   ac_cv_type_pid_t=yes
  2294. else
  2295.   rm -rf conftest*
  2296.   ac_cv_type_pid_t=no
  2297. fi
  2298. rm -f conftest*
  2299.  
  2300. fi
  2301. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2302. if test $ac_cv_type_pid_t = no; then
  2303.   cat >> confdefs.h <<\EOF
  2304. #define pid_t int
  2305. EOF
  2306.  
  2307. fi
  2308.  
  2309. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  2310. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  2311.   echo $ac_n "(cached) $ac_c" 1>&6
  2312. else
  2313.   cat > conftest.$ac_ext <<EOF
  2314. #line 2315 "configure"
  2315. #include "confdefs.h"
  2316. #include <sys/types.h>
  2317. #if STDC_HEADERS
  2318. #include <stdlib.h>
  2319. #endif
  2320. EOF
  2321. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2322.   egrep "off_t" >/dev/null 2>&1; then
  2323.   rm -rf conftest*
  2324.   ac_cv_type_off_t=yes
  2325. else
  2326.   rm -rf conftest*
  2327.   ac_cv_type_off_t=no
  2328. fi
  2329. rm -f conftest*
  2330.  
  2331. fi
  2332. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  2333. if test $ac_cv_type_off_t = no; then
  2334.   cat >> confdefs.h <<\EOF
  2335. #define off_t long
  2336. EOF
  2337.  
  2338. fi
  2339.  
  2340. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  2341. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  2342.   echo $ac_n "(cached) $ac_c" 1>&6
  2343. else
  2344.   cat > conftest.$ac_ext <<EOF
  2345. #line 2346 "configure"
  2346. #include "confdefs.h"
  2347. #include <sys/types.h>
  2348. #if STDC_HEADERS
  2349. #include <stdlib.h>
  2350. #endif
  2351. EOF
  2352. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2353.   egrep "mode_t" >/dev/null 2>&1; then
  2354.   rm -rf conftest*
  2355.   ac_cv_type_mode_t=yes
  2356. else
  2357.   rm -rf conftest*
  2358.   ac_cv_type_mode_t=no
  2359. fi
  2360. rm -f conftest*
  2361.  
  2362. fi
  2363. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  2364. if test $ac_cv_type_mode_t = no; then
  2365.   cat >> confdefs.h <<\EOF
  2366. #define mode_t int
  2367. EOF
  2368.  
  2369. fi
  2370.  
  2371. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2372. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  2373.   echo $ac_n "(cached) $ac_c" 1>&6
  2374. else
  2375.   cat > conftest.$ac_ext <<EOF
  2376. #line 2377 "configure"
  2377. #include "confdefs.h"
  2378. #include <sys/types.h>
  2379. EOF
  2380. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2381.   egrep "uid_t" >/dev/null 2>&1; then
  2382.   rm -rf conftest*
  2383.   ac_cv_type_uid_t=yes
  2384. else
  2385.   rm -rf conftest*
  2386.   ac_cv_type_uid_t=no
  2387. fi
  2388. rm -f conftest*
  2389.  
  2390. fi
  2391.  
  2392. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2393. if test $ac_cv_type_uid_t = no; then
  2394.   cat >> confdefs.h <<\EOF
  2395. #define uid_t int
  2396. EOF
  2397.  
  2398.   cat >> confdefs.h <<\EOF
  2399. #define gid_t int
  2400. EOF
  2401.  
  2402. fi
  2403.  
  2404. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2405. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2406.   echo $ac_n "(cached) $ac_c" 1>&6
  2407. else
  2408.   cat > conftest.$ac_ext <<EOF
  2409. #line 2410 "configure"
  2410. #include "confdefs.h"
  2411. #include <sys/types.h>
  2412. #if STDC_HEADERS
  2413. #include <stdlib.h>
  2414. #endif
  2415. EOF
  2416. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2417.   egrep "size_t" >/dev/null 2>&1; then
  2418.   rm -rf conftest*
  2419.   ac_cv_type_size_t=yes
  2420. else
  2421.   rm -rf conftest*
  2422.   ac_cv_type_size_t=no
  2423. fi
  2424. rm -f conftest*
  2425.  
  2426. fi
  2427. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2428. if test $ac_cv_type_size_t = no; then
  2429.   cat >> confdefs.h <<\EOF
  2430. #define size_t unsigned
  2431. EOF
  2432.  
  2433. fi
  2434.  
  2435.  
  2436. echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
  2437. if eval "test \"`echo '$''{'zsh_cv_sigset_t'+set}'`\" = set"; then
  2438.   echo $ac_n "(cached) $ac_c" 1>&6
  2439. else
  2440.   cat > conftest.$ac_ext <<EOF
  2441. #line 2442 "configure"
  2442. #include "confdefs.h"
  2443. #include <sys/types.h>
  2444. #include <signal.h>
  2445. int main() { return 0; }
  2446. int t() {
  2447. sigset_t tempsigset;
  2448. ; return 0; }
  2449. EOF
  2450. if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2451.   rm -rf conftest*
  2452.   zsh_cv_sigset_t=yes
  2453. else
  2454.   rm -rf conftest*
  2455.   zsh_cv_sigset_t=no
  2456. fi
  2457. rm -f conftest*
  2458.  
  2459. fi
  2460.  
  2461. echo "$ac_t""$zsh_cv_sigset_t" 1>&6
  2462. if test $zsh_cv_sigset_t = no; then
  2463.   cat >> confdefs.h <<\EOF
  2464. #define sigset_t unsigned int
  2465. EOF
  2466.  
  2467. fi
  2468.  
  2469. echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
  2470. if eval "test \"`echo '$''{'zsh_cv_struct_timezone'+set}'`\" = set"; then
  2471.   echo $ac_n "(cached) $ac_c" 1>&6
  2472. else
  2473.   cat > conftest.$ac_ext <<EOF
  2474. #line 2475 "configure"
  2475. #include "confdefs.h"
  2476. #include <sys/time.h>
  2477. int main() { return 0; }
  2478. int t() {
  2479. struct timezone dummy_tz;
  2480. ; return 0; }
  2481. EOF
  2482. if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2483.   rm -rf conftest*
  2484.   zsh_cv_struct_timezone=yes
  2485. else
  2486.   rm -rf conftest*
  2487.   zsh_cv_struct_timezone=no
  2488. fi
  2489. rm -f conftest*
  2490.  
  2491. fi
  2492.  
  2493. echo "$ac_t""$zsh_cv_struct_timezone" 1>&6
  2494. if test $zsh_cv_struct_timezone = yes; then
  2495.   cat >> confdefs.h <<\EOF
  2496. #define HAVE_STRUCT_TIMEZONE 1
  2497. EOF
  2498.  
  2499. fi
  2500.  
  2501. echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  2502. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  2503.   echo $ac_n "(cached) $ac_c" 1>&6
  2504. else
  2505.   if test "$cross_compiling" = yes; then
  2506.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  2507. else
  2508. cat > conftest.$ac_ext <<EOF
  2509. #line 2510 "configure"
  2510. #include "confdefs.h"
  2511.  
  2512. /*
  2513.  * If this system has a BSD-style getpgrp(),
  2514.  * which takes a pid argument, exit unsuccessfully.
  2515.  *
  2516.  * Snarfed from Chet Ramey's bash pgrp.c test program
  2517.  */
  2518. #include <stdio.h>
  2519. #include <sys/types.h>
  2520.  
  2521. int     pid;
  2522. int     pg1, pg2, pg3, pg4;
  2523. int     ng, np, s, child;
  2524.  
  2525. main()
  2526. {
  2527.         pid = getpid();
  2528.         pg1 = getpgrp(0);
  2529.         pg2 = getpgrp();
  2530.         pg3 = getpgrp(pid);
  2531.         pg4 = getpgrp(1);
  2532.  
  2533.         /*
  2534.          * If all of these values are the same, it's pretty sure that
  2535.          * we're on a system that ignores getpgrp's first argument.
  2536.          */
  2537.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  2538.                 exit(0);
  2539.  
  2540.         child = fork();
  2541.         if (child < 0)
  2542.                 exit(1);
  2543.         else if (child == 0) {
  2544.                 np = getpid();
  2545.                 /*
  2546.                  * If this is Sys V, this will not work; pgrp will be
  2547.                  * set to np because setpgrp just changes a pgrp to be
  2548.                  * the same as the pid.
  2549.                  */
  2550.                 setpgrp(np, pg1);
  2551.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  2552.                 if (ng == pg1) {
  2553.                         exit(1);
  2554.                 } else {
  2555.                         exit(0);
  2556.                 }
  2557.         } else {
  2558.                 wait(&s);
  2559.                 exit(s>>8);
  2560.         }
  2561. }
  2562.  
  2563. EOF
  2564. { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  2565. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2566.   ac_cv_func_getpgrp_void=yes
  2567. else
  2568.   ac_cv_func_getpgrp_void=no
  2569. fi
  2570. fi
  2571. rm -fr conftest*
  2572.  
  2573. fi
  2574.  
  2575. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  2576. if test $ac_cv_func_getpgrp_void = yes; then
  2577.   cat >> confdefs.h <<\EOF
  2578. #define GETPGRP_VOID 1
  2579. EOF
  2580.  
  2581. fi
  2582.  
  2583.  
  2584.  
  2585. for ac_func in strftime waitpid select tcsetpgrp tcgetattr strstr lstat \
  2586.               getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime  \
  2587.               sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit  \
  2588.               sigprocmask setuid seteuid setreuid setresuid strerror strcoll
  2589. do
  2590. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2591. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2592.   echo $ac_n "(cached) $ac_c" 1>&6
  2593. else
  2594.   cat > conftest.$ac_ext <<EOF
  2595. #line 2596 "configure"
  2596. #include "confdefs.h"
  2597. /* System header to define __stub macros and hopefully few prototypes,
  2598.     which can conflict with char $ac_func(); below.  */
  2599. #include <assert.h>
  2600. /* Override any gcc2 internal prototype to avoid an error.  */
  2601. /* We use char because int might match the return type of a gcc2
  2602.     builtin and then its argument prototype would still apply.  */
  2603. char $ac_func();
  2604.  
  2605. int main() { return 0; }
  2606. int t() {
  2607.  
  2608. /* The GNU C library defines this for functions which it implements
  2609.     to always fail with ENOSYS.  Some functions are actually named
  2610.     something starting with __ and the normal name is an alias.  */
  2611. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2612. choke me
  2613. #else
  2614. $ac_func();
  2615. #endif
  2616.  
  2617. ; return 0; }
  2618. EOF
  2619. if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2620.   rm -rf conftest*
  2621.   eval "ac_cv_func_$ac_func=yes"
  2622. else
  2623.   rm -rf conftest*
  2624.   eval "ac_cv_func_$ac_func=no"
  2625. fi
  2626. rm -f conftest*
  2627.  
  2628. fi
  2629. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2630.   echo "$ac_t""yes" 1>&6
  2631.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2632.   cat >> confdefs.h <<EOF
  2633. #define $ac_tr_func 1
  2634. EOF
  2635.  
  2636. else
  2637.   echo "$ac_t""no" 1>&6
  2638. fi
  2639. done
  2640.  
  2641.  
  2642. echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6
  2643. if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
  2644.   signals_style=POSIX_SIGNALS
  2645.   cat >> confdefs.h <<\EOF
  2646. #define POSIX_SIGNALS 1
  2647. EOF
  2648.  
  2649. elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
  2650.   signals_style=BSD_SIGNALS
  2651.   cat >> confdefs.h <<\EOF
  2652. #define BSD_SIGNALS 1
  2653. EOF
  2654.  
  2655. elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
  2656.   signals_style=SYSV_SIGNALS
  2657.   cat >> confdefs.h <<\EOF
  2658. #define SYSV_SIGNALS 1
  2659. EOF
  2660.  
  2661. else
  2662.   signals_style=NO_SIGNAL_BLOCKING
  2663.   cat >> confdefs.h <<\EOF
  2664. #define NO_SIGNAL_BLOCKING 1
  2665. EOF
  2666.  
  2667. fi
  2668. cat >> confdefs.h <<EOF
  2669. #define $signals_style 1
  2670. EOF
  2671.  
  2672. echo "$ac_t""$signals_style" 1>&6
  2673.  
  2674. echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6
  2675. for SIGNAL_H in /usr/include/bsd/sys/signal.h                   /usr/include/asm/signal.h                       /usr/include/linux/signal.h                     /usr/include/sys/signal.h                       /dev/null;                      do
  2676.   test -f $SIGNAL_H && \
  2677.   grep '#[     ]*define[     ][     ]*SIG[0-9A-Z]*[     ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
  2678.   break
  2679. done
  2680. echo "$ac_t""$SIGNAL_H" 1>&6
  2681.  
  2682. echo $ac_n "checking for /dev/fd filesystem""... $ac_c" 1>&6
  2683. if eval "test \"`echo '$''{'zsh_cv_have_dev_fd'+set}'`\" = set"; then
  2684.   echo $ac_n "(cached) $ac_c" 1>&6
  2685. else
  2686.   test -d /dev/fd && zsh_cv_have_dev_fd=yes || zsh_cv_have_dev_fd=no
  2687. fi
  2688.  
  2689. echo "$ac_t""$zsh_cv_have_dev_fd" 1>&6
  2690. if test $zsh_cv_have_dev_fd = yes; then
  2691.   cat >> confdefs.h <<\EOF
  2692. #define HAVE_DEV_FD 1
  2693. EOF
  2694.  
  2695. fi
  2696.  
  2697. echo $ac_n "checking for RFS superroot directory""... $ac_c" 1>&6
  2698. if eval "test \"`echo '$''{'zsh_cv_have_superroot'+set}'`\" = set"; then
  2699.   echo $ac_n "(cached) $ac_c" 1>&6
  2700. else
  2701.   test -d /../.LOCALROOT && zsh_cv_have_superroot=yes || zsh_cv_have_superroot=no
  2702. fi
  2703.  
  2704. echo "$ac_t""$zsh_cv_have_superroot" 1>&6
  2705. if test $zsh_cv_have_superroot = yes; then
  2706.   cat >> confdefs.h <<\EOF
  2707. #define HAVE_SUPERROOT 1
  2708. EOF
  2709.  
  2710. fi
  2711.  
  2712. echo $ac_n "checking for NIS""... $ac_c" 1>&6
  2713. if eval "test \"`echo '$''{'zsh_cv_have_nis'+set}'`\" = set"; then
  2714.   echo $ac_n "(cached) $ac_c" 1>&6
  2715. else
  2716.   test -f /usr/bin/ypcat && /usr/bin/ypcat passwd.byname > /dev/null 2>&1 && \
  2717. zsh_cv_have_nis=yes || zsh_cv_have_nis=no
  2718. fi
  2719.  
  2720. echo "$ac_t""$zsh_cv_have_nis" 1>&6
  2721. if test $zsh_cv_have_nis = yes; then
  2722.   cat >> confdefs.h <<\EOF
  2723. #define HAVE_NIS 1
  2724. EOF
  2725.  
  2726. fi
  2727.  
  2728. echo $ac_n "checking for NIS+""... $ac_c" 1>&6
  2729. if eval "test \"`echo '$''{'zsh_cv_have_nis_plus'+set}'`\" = set"; then
  2730.   echo $ac_n "(cached) $ac_c" 1>&6
  2731. else
  2732.   test -f /usr/bin/nisls && /usr/bin/nisls > /dev/null 2>&1 && \
  2733. zsh_cv_have_nis_plus=yes || zsh_cv_have_nis_plus=no
  2734. fi
  2735.  
  2736. echo "$ac_t""$zsh_cv_have_nis_plus" 1>&6
  2737. if test $zsh_cv_have_nis_plus = yes; then
  2738.   cat >> confdefs.h <<\EOF
  2739. #define HAVE_NIS_PLUS 1
  2740. EOF
  2741.  
  2742. fi
  2743.  
  2744. echo $ac_n "checking where utmp is located""... $ac_c" 1>&6
  2745. for utmp_file in /etc/utmp                        /usr/etc/utmp                    /var/adm/utmp                    /usr/adm/utmp                    /var/run/utmp                    /dev/null;      do
  2746.   test -f $utmp_file && break
  2747. done
  2748. echo "$ac_t""$utmp_file" 1>&6
  2749. cat >> confdefs.h <<EOF
  2750. #define UTMP_FILE_CONFIG "$utmp_file"
  2751. EOF
  2752.  
  2753.  
  2754. echo $ac_n "checking where wtmp is located""... $ac_c" 1>&6
  2755. for wtmp_file in /etc/wtmp                       /usr/etc/wtmp                   /var/adm/wtmp                   /usr/adm/wtmp                   /var/log/wtmp                   /dev/null;     do
  2756.   test -f $wtmp_file && break
  2757. done
  2758. cat >> confdefs.h <<EOF
  2759. #define WTMP_FILE_CONFIG "$wtmp_file"
  2760. EOF
  2761.  
  2762. echo "$ac_t""$wtmp_file" 1>&6
  2763.  
  2764. echo $ac_n "checking if typeahead needs FIONREAD""... $ac_c" 1>&6
  2765. if eval "test \"`echo '$''{'zsh_cv_clobbers_typeahead'+set}'`\" = set"; then
  2766.   echo $ac_n "(cached) $ac_c" 1>&6
  2767. else
  2768.   test `echo $host_os | sed 's/^\([a-z]*\).*/\1/'` = ultrix &&
  2769. zsh_cv_clobbers_typeahead=yes || zsh_cv_clobbers_typeahead=no
  2770. fi
  2771.  
  2772. echo "$ac_t""$zsh_cv_clobbers_typeahead" 1>&6
  2773. if test $zsh_cv_clobbers_typeahead = yes; then
  2774.   cat >> confdefs.h <<\EOF
  2775. #define CLOBBERS_TYPEAHEAD 1
  2776. EOF
  2777.  
  2778. fi
  2779.  
  2780. echo $ac_n "checking for brk() prototype in <unistd.h>""... $ac_c" 1>&6
  2781. if eval "test \"`echo '$''{'zsh_cv_brk_proto_in_unistd_h'+set}'`\" = set"; then
  2782.   echo $ac_n "(cached) $ac_c" 1>&6
  2783. else
  2784.   cat > conftest.$ac_ext <<EOF
  2785. #line 2786 "configure"
  2786. #include "confdefs.h"
  2787. #include <unistd.h>
  2788. double brk();
  2789. int main() { return 0; }
  2790. int t() {
  2791. int i;
  2792. ; return 0; }
  2793. EOF
  2794. if { (eval echo configure:2795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2795.   rm -rf conftest*
  2796.   zsh_cv_brk_proto_in_unistd_h=no
  2797. else
  2798.   rm -rf conftest*
  2799.   zsh_cv_brk_proto_in_unistd_h=yes
  2800. fi
  2801. rm -f conftest*
  2802.  
  2803. fi
  2804.  
  2805. echo "$ac_t""$zsh_cv_brk_proto_in_unistd_h" 1>&6
  2806. if test $zsh_cv_brk_proto_in_unistd_h = yes; then
  2807.   cat >> confdefs.h <<\EOF
  2808. #define HAVE_BRK_PROTO 1
  2809. EOF
  2810.  
  2811. fi
  2812.  
  2813. echo $ac_n "checking for sbrk() prototype in <unistd.h>""... $ac_c" 1>&6
  2814. if eval "test \"`echo '$''{'zsh_cv_sbrk_proto_in_unistd_h'+set}'`\" = set"; then
  2815.   echo $ac_n "(cached) $ac_c" 1>&6
  2816. else
  2817.   cat > conftest.$ac_ext <<EOF
  2818. #line 2819 "configure"
  2819. #include "confdefs.h"
  2820. #include <unistd.h>
  2821. double sbrk();
  2822. int main() { return 0; }
  2823. int t() {
  2824. int i;
  2825. ; return 0; }
  2826. EOF
  2827. if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2828.   rm -rf conftest*
  2829.   zsh_cv_sbrk_proto_in_unistd_h=no
  2830. else
  2831.   rm -rf conftest*
  2832.   zsh_cv_sbrk_proto_in_unistd_h=yes
  2833. fi
  2834. rm -f conftest*
  2835.  
  2836. fi
  2837.  
  2838. echo "$ac_t""$zsh_cv_sbrk_proto_in_unistd_h" 1>&6
  2839. if test $zsh_cv_sbrk_proto_in_unistd_h = yes; then
  2840.   cat >> confdefs.h <<\EOF
  2841. #define HAVE_SBRK_PROTO 1
  2842. EOF
  2843.  
  2844. fi
  2845.  
  2846. trap '' 1 2 15
  2847. cat > confcache <<\EOF
  2848. # This file is a shell script that caches the results of configure
  2849. # tests run on this system so they can be shared between configure
  2850. # scripts and configure runs.  It is not useful on other systems.
  2851. # If it contains results you don't want to keep, you may remove or edit it.
  2852. #
  2853. # By default, configure uses ./config.cache as the cache file,
  2854. # creating it if it does not exist already.  You can give configure
  2855. # the --cache-file=FILE option to use a different cache file; that is
  2856. # what configure does when it calls configure scripts in
  2857. # subdirectories, so they share the cache.
  2858. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2859. # config.status only pays attention to the cache file if you give it the
  2860. # --recheck option to rerun configure.
  2861. #
  2862. EOF
  2863. # Ultrix sh set writes to stderr and can't be redirected directly,
  2864. # and sets the high bit in the cache file unless we assign to the vars.
  2865. (set) 2>&1 |
  2866.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2867.   >> confcache
  2868. if cmp -s $cache_file confcache; then
  2869.   :
  2870. else
  2871.   if test -w $cache_file; then
  2872.     echo "updating cache $cache_file"
  2873.     cat confcache > $cache_file
  2874.   else
  2875.     echo "not updating unwritable cache $cache_file"
  2876.   fi
  2877. fi
  2878. rm -f confcache
  2879.  
  2880. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2881.  
  2882. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2883. # Let make expand exec_prefix.
  2884. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2885.  
  2886. # Any assignment to VPATH causes Sun make to only execute
  2887. # the first set of double-colon rules, so remove it if not needed.
  2888. # If there is a colon in the path, we need to keep it.
  2889. if test "x$srcdir" = x.; then
  2890.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2891. fi
  2892.  
  2893. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2894.  
  2895. DEFS=-DHAVE_CONFIG_H
  2896.  
  2897. # Without the "./", some shells look in PATH for config.status.
  2898. : ${CONFIG_STATUS=./config.status}
  2899.  
  2900. echo creating $CONFIG_STATUS
  2901. rm -f $CONFIG_STATUS
  2902. cat > $CONFIG_STATUS <<EOF
  2903. #! /bin/sh
  2904. # Generated automatically by configure.
  2905. # Run this file to recreate the current configuration.
  2906. # This directory was configured as follows,
  2907. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2908. #
  2909. # $0 $ac_configure_args
  2910. #
  2911. # Compiler output produced by configure, useful for debugging
  2912. # configure, is in ./config.log if it exists.
  2913.  
  2914. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2915. for ac_option
  2916. do
  2917.   case "\$ac_option" in
  2918.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2919.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2920.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2921.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2922.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  2923.     exit 0 ;;
  2924.   -help | --help | --hel | --he | --h)
  2925.     echo "\$ac_cs_usage"; exit 0 ;;
  2926.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2927.   esac
  2928. done
  2929.  
  2930. ac_given_srcdir=$srcdir
  2931. ac_given_INSTALL="$INSTALL"
  2932.  
  2933. trap 'rm -fr `echo "Makefile Src/Makefile Doc/Makefile Etc/Makefile Misc/Makefile \
  2934. Util/Makefile Functions/Makefile StartupFiles/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2935. EOF
  2936. cat >> $CONFIG_STATUS <<EOF
  2937.  
  2938. # Protect against being on the right side of a sed subst in config.status.
  2939. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2940.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2941. $ac_vpsub
  2942. $extrasub
  2943. s%@CFLAGS@%$CFLAGS%g
  2944. s%@CPPFLAGS@%$CPPFLAGS%g
  2945. s%@CXXFLAGS@%$CXXFLAGS%g
  2946. s%@DEFS@%$DEFS%g
  2947. s%@LDFLAGS@%$LDFLAGS%g
  2948. s%@LIBS@%$LIBS%g
  2949. s%@exec_prefix@%$exec_prefix%g
  2950. s%@prefix@%$prefix%g
  2951. s%@program_transform_name@%$program_transform_name%g
  2952. s%@bindir@%$bindir%g
  2953. s%@sbindir@%$sbindir%g
  2954. s%@libexecdir@%$libexecdir%g
  2955. s%@datadir@%$datadir%g
  2956. s%@sysconfdir@%$sysconfdir%g
  2957. s%@sharedstatedir@%$sharedstatedir%g
  2958. s%@localstatedir@%$localstatedir%g
  2959. s%@libdir@%$libdir%g
  2960. s%@includedir@%$includedir%g
  2961. s%@oldincludedir@%$oldincludedir%g
  2962. s%@infodir@%$infodir%g
  2963. s%@mandir@%$mandir%g
  2964. s%@VERSION@%$VERSION%g
  2965. s%@host@%$host%g
  2966. s%@host_alias@%$host_alias%g
  2967. s%@host_cpu@%$host_cpu%g
  2968. s%@host_vendor@%$host_vendor%g
  2969. s%@host_os@%$host_os%g
  2970. s%@zshenv@%$zshenv%g
  2971. s%@zshrc@%$zshrc%g
  2972. s%@zprofile@%$zprofile%g
  2973. s%@zlogin@%$zlogin%g
  2974. s%@zlogout@%$zlogout%g
  2975. s%@CC@%$CC%g
  2976. s%@CPP@%$CPP%g
  2977. s%@U@%$U%g
  2978. s%@SET_MAKE@%$SET_MAKE%g
  2979. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2980. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2981. s%@AWK@%$AWK%g
  2982. s%@SIGNAL_H@%$SIGNAL_H%g
  2983.  
  2984. CEOF
  2985. EOF
  2986. cat >> $CONFIG_STATUS <<EOF
  2987.  
  2988. CONFIG_FILES=\${CONFIG_FILES-"Makefile Src/Makefile Doc/Makefile Etc/Makefile Misc/Makefile \
  2989. Util/Makefile Functions/Makefile StartupFiles/Makefile"}
  2990. EOF
  2991. cat >> $CONFIG_STATUS <<\EOF
  2992. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2993.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2994.   case "$ac_file" in
  2995.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2996.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2997.   *) ac_file_in="${ac_file}.in" ;;
  2998.   esac
  2999.  
  3000.   # Adjust relative srcdir, etc. for subdirectories.
  3001.  
  3002.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3003.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3004.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3005.     # The file is in a subdirectory.
  3006.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3007.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3008.     # A "../" for each directory in $ac_dir_suffix.
  3009.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3010.   else
  3011.     ac_dir_suffix= ac_dots=
  3012.   fi
  3013.  
  3014.   case "$ac_given_srcdir" in
  3015.   .)  srcdir=.
  3016.       if test -z "$ac_dots"; then top_srcdir=.
  3017.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3018.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3019.   *) # Relative path.
  3020.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3021.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3022.   esac
  3023.  
  3024.   case "$ac_given_INSTALL" in
  3025.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3026.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3027.   esac
  3028.   echo creating "$ac_file"
  3029.   rm -f "$ac_file"
  3030.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3031.   case "$ac_file" in
  3032.   *Makefile*) ac_comsub="1i\\
  3033. # $configure_input" ;;
  3034.   *) ac_comsub= ;;
  3035.   esac
  3036.   sed -e "$ac_comsub
  3037. s%@configure_input@%$configure_input%g
  3038. s%@srcdir@%$srcdir%g
  3039. s%@top_srcdir@%$top_srcdir%g
  3040. s%@INSTALL@%$INSTALL%g
  3041. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  3042. fi; done
  3043. rm -f conftest.subs
  3044.  
  3045. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3046. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3047. #
  3048. # ac_d sets the value in "#define NAME VALUE" lines.
  3049. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3050. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3051. ac_dC='\3'
  3052. ac_dD='%g'
  3053. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3054. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3055. ac_uB='\([     ]\)%\1#\2define\3'
  3056. ac_uC=' '
  3057. ac_uD='\4%g'
  3058. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3059. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3060. ac_eB='$%\1#\2define\3'
  3061. ac_eC=' '
  3062. ac_eD='%g'
  3063.  
  3064. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  3065. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3066.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3067.   case "$ac_file" in
  3068.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3069.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3070.   *) ac_file_in="${ac_file}.in" ;;
  3071.   esac
  3072.  
  3073.   echo creating $ac_file
  3074.  
  3075.   rm -f conftest.frag conftest.in conftest.out
  3076.   cp $ac_given_srcdir/$ac_file_in conftest.in
  3077.  
  3078. EOF
  3079.  
  3080. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3081. # the proper values into config.h.in to produce config.h.  And first:
  3082. # Protect against being on the right side of a sed subst in config.status.
  3083. # Protect against being in an unquoted here document in config.status.
  3084. rm -f conftest.vals
  3085. cat > conftest.hdr <<\EOF
  3086. s/[\\&%]/\\&/g
  3087. s%[\\$`]%\\&%g
  3088. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3089. s%ac_d%ac_u%gp
  3090. s%ac_u%ac_e%gp
  3091. EOF
  3092. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3093. rm -f conftest.hdr
  3094.  
  3095. # This sed command replaces #undef with comments.  This is necessary, for
  3096. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3097. # on some systems where configure will not decide to define it.
  3098. cat >> conftest.vals <<\EOF
  3099. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3100. EOF
  3101.  
  3102. # Break up conftest.vals because some shells have a limit on
  3103. # the size of here documents, and old seds have small limits too.
  3104. # Maximum number of lines to put in a single here document.
  3105. ac_max_here_lines=12
  3106.  
  3107. rm -f conftest.tail
  3108. while :
  3109. do
  3110.   ac_lines=`grep -c . conftest.vals`
  3111.   # grep -c gives empty output for an empty file on some AIX systems.
  3112.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3113.   # Write a limited-size here document to conftest.frag.
  3114.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3115.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3116.   echo 'CEOF
  3117.   sed -f conftest.frag conftest.in > conftest.out
  3118.   rm -f conftest.in
  3119.   mv conftest.out conftest.in
  3120. ' >> $CONFIG_STATUS
  3121.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3122.   rm -f conftest.vals
  3123.   mv conftest.tail conftest.vals
  3124. done
  3125. rm -f conftest.vals
  3126.  
  3127. cat >> $CONFIG_STATUS <<\EOF
  3128.   rm -f conftest.frag conftest.h
  3129.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3130.   cat conftest.in >> conftest.h
  3131.   rm -f conftest.in
  3132.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3133.     echo "$ac_file is unchanged"
  3134.     rm -f conftest.h
  3135.   else
  3136.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3137.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3138.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3139.       # The file is in a subdirectory.
  3140.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3141.     fi
  3142.     rm -f $ac_file
  3143.     mv conftest.h $ac_file
  3144.   fi
  3145. fi; done
  3146.  
  3147.  
  3148. \
  3149. test -z "$CONFIG_HEADERS" || echo > stamp-h
  3150. exit 0
  3151. EOF
  3152. chmod +x $CONFIG_STATUS
  3153. rm -fr confdefs* $ac_clean_files
  3154. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3155.  
  3156.  
  3157. eval "zshbin1=${bindir}"
  3158. eval "zshbin2=${zshbin1}"
  3159. eval "zshman=${mandir}"
  3160. eval "zshinfo=${infodir}"
  3161.  
  3162. echo "
  3163. zsh configuration
  3164. -----------------
  3165. zsh version           : ${VERSION}
  3166. host operating system : ${host_os}
  3167. source code location  : ${srcdir}
  3168. compiler              : ${CC}
  3169. compiler flags        : ${CFLAGS}
  3170. binary install path   : ${zshbin2}
  3171. man page install path : ${zshman}
  3172. info install path     : ${zshinfo}"
  3173. echo ""
  3174.  
  3175.